ruby-changes:43291
From: usa <ko1@a...>
Date: Fri, 10 Jun 2016 18:04:15 +0900 (JST)
Subject: [ruby-changes:43291] usa:r55365 (ruby_2_2): Revert r55357 because of test failures.
usa 2016-06-10 18:04:00 +0900 (Fri, 10 Jun 2016) New Revision: 55365 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55365 Log: Revert r55357 because of test failures. Modified files: branches/ruby_2_2/ChangeLog branches/ruby_2_2/lib/rubygems/core_ext/kernel_require.rb branches/ruby_2_2/test/rubygems/test_require.rb branches/ruby_2_2/version.h Index: ruby_2_2/ChangeLog =================================================================== --- ruby_2_2/ChangeLog (revision 55364) +++ ruby_2_2/ChangeLog (revision 55365) @@ -33,11 +33,6 @@ Fri Jun 10 16:24:29 2016 Marcus Stollst https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L33 documentation to RDoc from Markdown. [ruby-core:75136] [Bug #12311] -Fri Jun 10 16:19:14 2016 Aaron Patterson <aaron.patterson@g...> - - * 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@r...> * variable.c (rb_local_constants_i): exclude hidden constants. Index: ruby_2_2/lib/rubygems/core_ext/kernel_require.rb =================================================================== --- ruby_2_2/lib/rubygems/core_ext/kernel_require.rb (revision 55364) +++ ruby_2_2/lib/rubygems/core_ext/kernel_require.rb (revision 55365) @@ -66,7 +66,7 @@ module Kernel https://github.com/ruby/ruby/blob/trunk/ruby_2_2/lib/rubygems/core_ext/kernel_require.rb#L66 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... Index: ruby_2_2/version.h =================================================================== --- ruby_2_2/version.h (revision 55364) +++ ruby_2_2/version.h (revision 55365) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1 #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 Index: ruby_2_2/test/rubygems/test_require.rb =================================================================== --- ruby_2_2/test/rubygems/test_require.rb (revision 55364) +++ ruby_2_2/test/rubygems/test_require.rb (revision 55365) @@ -49,36 +49,6 @@ class TestGemRequire < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_2/test/rubygems/test_require.rb#L49 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/