diff options
Diffstat (limited to 'lib')
-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 |