aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems.rb')
-rw-r--r--lib/rubygems.rb29
1 files changed, 4 insertions, 25 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index dcfe74039c..0fb718aedc 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -207,7 +207,7 @@ module Gem
begin
while true
- path = GEM_DEP_FILES.find { |f| File.exists?(f) }
+ path = GEM_DEP_FILES.find { |f| File.file?(f) }
if path
path = File.join here, path
@@ -226,7 +226,9 @@ module Gem
end
end
- return unless File.exists? path
+ path.untaint
+
+ return unless File.file? path
rs = Gem::RequestSet.new
rs.load_gemdeps path
@@ -370,29 +372,6 @@ module Gem
end
##
- # Expand each partial gem path with each of the required paths specified
- # in the Gem spec. Each expanded path is yielded.
-
- def self.each_load_path(partials)
- partials.each do |gp|
- base = File.basename gp
- specfn = File.join(dir, "specifications", "#{base}.gemspec")
- if File.exists? specfn
- spec = eval(File.read(specfn))
- spec.require_paths.each do |rp|
- yield File.join(gp,rp)
- end
- else
- filename = File.join(gp, 'lib')
- yield(filename) if File.exists? filename
- end
- end
- end
-
- private_class_method :each_load_path
-
-
- ##
# Quietly ensure the named Gem directory contains all the proper
# subdirectories. If we can't create a directory due to a permission
# problem, then we will silently continue.