summaryrefslogtreecommitdiff
path: root/lib/rubygems/dependency_installer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/dependency_installer.rb')
-rw-r--r--lib/rubygems/dependency_installer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb
index ed90af0..0158a71 100644
--- a/lib/rubygems/dependency_installer.rb
+++ b/lib/rubygems/dependency_installer.rb
@@ -260,7 +260,7 @@ class Gem::DependencyInstaller
set = Gem::AvailableSet.new
if consider_local?
- if File.file? gem_name then
+ if gem_name =~ /\.gem$/ and File.file? gem_name then
src = Gem::Source::SpecificFile.new(gem_name)
set.add src.spec, src
else