summaryrefslogtreecommitdiff
path: root/lib/rubygems/core_ext
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-17 08:52:13 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-17 08:52:39 +0900
commit75d29db8f965893bb6ab38b9008abc80cdda246e (patch)
treefc26829a458817d4018178c77f1d18369e183d4d /lib/rubygems/core_ext
parentefd37f8fc3e021c93f37d1f7f08fcb6b909d6ecf (diff)
Revert "[rubygems/rubygems] [Require] Ensure -I beats a default gem"
This reverts commit 00cd5d74cecb6aa4a184e57e2b8246ef6e45d458.
Diffstat (limited to 'lib/rubygems/core_ext')
-rwxr-xr-xlib/rubygems/core_ext/kernel_require.rb20
1 files changed, 0 insertions, 20 deletions
diff --git a/lib/rubygems/core_ext/kernel_require.rb b/lib/rubygems/core_ext/kernel_require.rb
index 5986e35..8c85ef7 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")