ruby-changes:57126
From: Hiroshi <ko1@a...>
Date: Sat, 17 Aug 2019 15:22:25 +0900 (JST)
Subject: [ruby-changes:57126] Hiroshi SHIBATA: d041c6cebb (master): Added comments for extended require by RubyGems
https://git.ruby-lang.org/ruby.git/commit/?id=d041c6cebb From d041c6cebbe7fe973789616bef43200213e1a001 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Sat, 17 Aug 2019 12:35:30 +0900 Subject: Added comments for extended require by RubyGems diff --git a/lib/rubygems/core_ext/kernel_require.rb b/lib/rubygems/core_ext/kernel_require.rb index cc7ec7e..b4aebf8 100755 --- a/lib/rubygems/core_ext/kernel_require.rb +++ b/lib/rubygems/core_ext/kernel_require.rb @@ -36,11 +36,13 @@ module Kernel https://github.com/ruby/ruby/blob/trunk/lib/rubygems/core_ext/kernel_require.rb#L36 path = path.to_path if path.respond_to? :to_path + # Ensure -I beats a default gem + # https://github.com/rubygems/rubygems/pull/1868 resolved_path = begin rp = nil $LOAD_PATH[0...Gem.load_path_insert_index].each do |lp| safe_lp = lp.dup.untaint - next if File.symlink? safe_lp + next if File.symlink? safe_lp # for backword compatibility Gem.suffixes.each do |s| full_path = File.expand_path(File.join(safe_lp, "#{path}#{s}")) if File.file?(full_path) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/