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.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/rubygems/commands/which_command.rb b/lib/rubygems/commands/which_command.rb
index 704d79fc60..5c51ed72dd 100644
--- a/lib/rubygems/commands/which_command.rb
+++ b/lib/rubygems/commands/which_command.rb
@@ -44,8 +44,8 @@ requiring to see why it does not behave as you expect.
spec = Gem::Specification.find_by_path arg
- if spec then
- if options[:search_gems_first] then
+ if spec
+ if options[:search_gems_first]
dirs = spec.full_require_paths + $LOAD_PATH
else
dirs = $LOAD_PATH + spec.full_require_paths
@@ -55,7 +55,7 @@ requiring to see why it does not behave as you expect.
# TODO: this is totally redundant and stupid
paths = find_paths arg, dirs
- if paths.empty? then
+ if paths.empty?
alert_error "Can't find Ruby library file or shared library #{arg}"
found &&= false
@@ -73,7 +73,7 @@ requiring to see why it does not behave as you expect.
dirs.each do |dir|
Gem.suffixes.each do |ext|
full_path = File.join dir, "#{package_name}#{ext}"
- if File.exist? full_path and not File.directory? full_path then
+ if File.exist? full_path and not File.directory? full_path
result << full_path
return result unless options[:show_all]
end
@@ -88,4 +88,3 @@ requiring to see why it does not behave as you expect.
end
end
-