diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-23 05:37:26 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-23 05:37:26 +0000 |
commit | 80db78f51c82cb1290e11810c8c0c03afcdf6996 (patch) | |
tree | 341678d98a7b0ded39c6d288023df029cfcb5271 /lib/rubygems | |
parent | 9e67f6ecec169787bb489ccb3f71d32a141f01da (diff) | |
download | ruby-80db78f51c82cb1290e11810c8c0c03afcdf6996.tar.gz |
* gem_prelude.rb (Gem::QuickLoader.load_full_rubygems_library):
get rid of creating same regexps many times.
* lib/rubygems/custom_require.rb (Kernel#require): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems')
-rw-r--r-- | lib/rubygems/custom_require.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems/custom_require.rb b/lib/rubygems/custom_require.rb index 78c7872b6f..43b3136b60 100644 --- a/lib/rubygems/custom_require.rb +++ b/lib/rubygems/custom_require.rb @@ -30,7 +30,7 @@ module Kernel def require(path) # :doc: gem_original_require path rescue LoadError => load_error - if load_error.message =~ /#{Regexp.escape path}\z/ and + if load_error.message.end_with?(path) and spec = Gem.searcher.find(path) then Gem.activate(spec.name, "= #{spec.version}") gem_original_require path |