ruby-changes:52610
From: nobu <ko1@a...>
Date: Mon, 24 Sep 2018 16:46:13 +0900 (JST)
Subject: [ruby-changes:52610] nobu:r64822 (trunk): revert r64817: kernel_warn.rb: skip kernel_require.rb
nobu 2018-09-24 16:46:07 +0900 (Mon, 24 Sep 2018) New Revision: 64822 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64822 Log: revert r64817: kernel_warn.rb: skip kernel_require.rb Modified files: trunk/lib/rubygems.rb trunk/test/rubygems/test_require.rb Index: test/rubygems/test_require.rb =================================================================== --- test/rubygems/test_require.rb (revision 64821) +++ test/rubygems/test_require.rb (revision 64822) @@ -412,24 +412,6 @@ class TestGemRequire < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_require.rb#L412 end end - if RUBY_VERSION >= "2.5" - def test_no_kernel_require_in_warn_with_uplevel - lib = File.realpath("../../../lib", __FILE__) - Dir.mktmpdir("warn_test") do |dir| - File.write(dir + "/sub.rb", "warn 'uplevel test', uplevel: 2\n") - File.write(dir + "/main.rb", "require 'sub'\n") - _, err = capture_subprocess_io do - system(@@ruby, "-w", "--disable=gems", "-I", lib, "-C", dir, "-I.", "main.rb") - end - assert_equal "main.rb:1: warning: uplevel test\n", err - _, err = capture_subprocess_io do - system(@@ruby, "-w", "--enable=gems", "-I", lib, "-C", dir, "-I.", "main.rb") - end - assert_equal "main.rb:1: warning: uplevel test\n", err - end - end - end - def silence_warnings old_verbose, $VERBOSE = $VERBOSE, false yield Index: lib/rubygems.rb =================================================================== --- lib/rubygems.rb (revision 64821) +++ lib/rubygems.rb (revision 64822) @@ -1392,6 +1392,5 @@ Gem::Specification.load_defaults https://github.com/ruby/ruby/blob/trunk/lib/rubygems.rb#L1392 require 'rubygems/core_ext/kernel_gem' require 'rubygems/core_ext/kernel_require' -require 'rubygems/core_ext/kernel_warn' Gem.use_gemdeps -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/