summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/which_command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/commands/which_command.rb')
-rw-r--r--lib/rubygems/commands/which_command.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/rubygems/commands/which_command.rb b/lib/rubygems/commands/which_command.rb
index 2962491bde..6495278a87 100644
--- a/lib/rubygems/commands/which_command.rb
+++ b/lib/rubygems/commands/which_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
class Gem::Commands::WhichCommand < Gem::Command
@@ -66,7 +60,7 @@ class Gem::Commands::WhichCommand < Gem::Command
dirs.each do |dir|
Gem.suffixes.each do |ext|
full_path = File.join dir, "#{package_name}#{ext}"
- if File.exist? full_path then
+ if File.exist? full_path and not File.directory? full_path then
result << full_path
return result unless options[:show_all]
end