diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-17 08:52:13 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-17 08:52:39 +0900 |
commit | 75d29db8f965893bb6ab38b9008abc80cdda246e (patch) | |
tree | fc26829a458817d4018178c77f1d18369e183d4d /lib/rubygems | |
parent | efd37f8fc3e021c93f37d1f7f08fcb6b909d6ecf (diff) | |
download | ruby-75d29db8f965893bb6ab38b9008abc80cdda246e.tar.gz |
Revert "[rubygems/rubygems] [Require] Ensure -I beats a default gem"
This reverts commit 00cd5d74cecb6aa4a184e57e2b8246ef6e45d458.
Diffstat (limited to 'lib/rubygems')
-rwxr-xr-x | lib/rubygems/core_ext/kernel_require.rb | 20 | ||||
-rw-r--r-- | lib/rubygems/test_case.rb | 1 |
2 files changed, 0 insertions, 21 deletions
diff --git a/lib/rubygems/core_ext/kernel_require.rb b/lib/rubygems/core_ext/kernel_require.rb index 5986e356bc..8c85ef79fc 100755 --- a/lib/rubygems/core_ext/kernel_require.rb +++ b/lib/rubygems/core_ext/kernel_require.rb @@ -36,26 +36,6 @@ module Kernel path = path.to_path if path.respond_to? :to_path - resolved_path = begin - rp = nil - $LOAD_PATH[0...Gem.load_path_insert_index || -1].each do |lp| - Gem.suffixes.each do |s| - full_path = File.expand_path(File.join(lp, "#{path}#{s}").untaint) - if File.file?(full_path) - rp = full_path - break - end - end - break if rp - end - rp - end - - if resolved_path - RUBYGEMS_ACTIVATION_MONITOR.exit - return gem_original_require(resolved_path) - end - if spec = Gem.find_unresolved_default_spec(path) begin Kernel.send(:gem, spec.name, "#{Gem::Requirement.default}.a") diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index 4b43df539d..b6bb7ca93e 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -739,7 +739,6 @@ class Gem::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Uni spec.files = files lib_dir = File.join(@tempdir, "default_gems", "lib") - lib_dir.instance_variable_set(:@gem_prelude_index, lib_dir) $LOAD_PATH.unshift(lib_dir) files.each do |file| rb_path = File.join(lib_dir, file) |