diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-10 09:04:00 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-10 09:04:00 +0000 |
commit | ef2c94bc39ef1619c2c25b7eb9acaf2d4cb5bba0 (patch) | |
tree | 10341aa3691c8fc0f2e0911461ffbc4b1f819451 | |
parent | 2c490bea5b4eb31ae20386bc88d46d2ff432f407 (diff) |
Revert r55357 because of test failures.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | lib/rubygems/core_ext/kernel_require.rb | 2 | ||||
-rw-r--r-- | test/rubygems/test_require.rb | 30 | ||||
-rw-r--r-- | version.h | 2 |
4 files changed, 2 insertions, 37 deletions
@@ -33,11 +33,6 @@ Fri Jun 10 16:24:29 2016 Marcus Stollsteimer <sto.mar@web.de> documentation to RDoc from Markdown. [ruby-core:75136] [Bug #12311] -Fri Jun 10 16:19:14 2016 Aaron Patterson <aaron.patterson@gmail.com> - - * lib/rubygems/core_ext/kernel_require.rb: -I should always win over - gems. [ruby-core:74814] [Backport #12248] - Fri Jun 10 16:12:58 2016 Nobuyoshi Nakada <nobu@ruby-lang.org> * variable.c (rb_local_constants_i): exclude hidden constants. diff --git a/lib/rubygems/core_ext/kernel_require.rb b/lib/rubygems/core_ext/kernel_require.rb index bf9618d3bf..8f2cddee4d 100755 --- a/lib/rubygems/core_ext/kernel_require.rb +++ b/lib/rubygems/core_ext/kernel_require.rb @@ -66,7 +66,7 @@ module Kernel begin RUBYGEMS_ACTIVATION_MONITOR.exit - return gem_original_require(path) + return gem_original_require(spec.to_fullpath(path) || path) end if spec # Attempt to find +path+ in any unresolved gems... diff --git a/test/rubygems/test_require.rb b/test/rubygems/test_require.rb index 8aa9aac38c..dec5285d21 100644 --- a/test/rubygems/test_require.rb +++ b/test/rubygems/test_require.rb @@ -49,36 +49,6 @@ class TestGemRequire < Gem::TestCase end end - # Providing -I on the commandline should always beat gems - def test_dash_i_beats_gems - a1 = new_spec "a", "1", {"b" => "= 1"}, "lib/test_gem_require_a.rb" - b1 = new_spec "b", "1", {"c" => "> 0"}, "lib/b/c.rb" - c1 = new_spec "c", "1", nil, "lib/c/c.rb" - c2 = new_spec "c", "2", nil, "lib/c/c.rb" - - install_specs c1, c2, b1, a1 - - dir = Dir.mktmpdir - dash_i_arg = File.join Dir.mktmpdir, 'lib' - - c_rb = File.join dash_i_arg, 'b', 'c.rb' - - FileUtils.mkdir_p File.dirname c_rb - File.open(c_rb, 'w') { |f| f.write "class Object; HELLO = 'world' end" } - - lp = $LOAD_PATH.dup - - # Pretend to provide a commandline argument that overrides a file in gem b - $LOAD_PATH.unshift dash_i_arg - - assert_require 'test_gem_require_a' - assert_require 'b/c' # this should be required from -I - assert_equal "world", ::Object::HELLO - ensure - $LOAD_PATH.replace lp - Object.send :remove_const, :HELLO if Object.const_defined? :HELLO - end - def test_concurrent_require Object.const_set :FILE_ENTERED_LATCH, Latch.new(2) Object.const_set :FILE_EXIT_LATCH, Latch.new(1) @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.2.6" #define RUBY_RELEASE_DATE "2016-06-10" -#define RUBY_PATCHLEVEL 338 +#define RUBY_PATCHLEVEL 339 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 6 |