Permalink
Browse files

Fix compatibility with 1.8.2

git-svn-id: svn+ssh://rubyforge.org/var/svn/rubygems/trunk@1489 3d4018f9-ac1a-0410-99e9-8a154d859a19
  • Loading branch information...
1 parent f70164f commit 6b21f4be76ace3af281adc1a865b4aa72c1d79f7 @drbrain drbrain committed Nov 10, 2007
Showing with 3 additions and 1 deletion.
  1. +2 −0 ChangeLog
  2. +1 −1 lib/rubygems/custom_require.rb
View
@@ -4,6 +4,8 @@
* lib/rubygems/indexer.rb: Handle legacy platforms.
* lib/rubygems/platform.rb: Gem::Platform is a valid argument. Bug
#15511 submitted by Daniel Berger.
+ * lib/rubygems/custom_require.rb: Fix compatibility with 1.8.2. Bug
+ #14933 submitted by Aaron Patterson.
2007-10-30 Eric Hodel <drbrain@segment7.net>
@@ -26,7 +26,7 @@ module Kernel
def require(path) # :nodoc:
gem_original_require path
rescue LoadError => load_error
- if load_error.message == "no such file to load -- #{path}" and
+ if load_error.message =~ /\A[Nn]o such file to load -- #{Regexp.escape path}\z/ and
spec = Gem.searcher.find(path) then
Gem.activate(spec.name, false, "= #{spec.version}")
gem_original_require path

0 comments on commit 6b21f4b

Please sign in to comment.