mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 05:25:34 +02:00
* lib/rubygems: update to 1.3.6.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
65544f575b
commit
b551e8c8b3
119 changed files with 2735 additions and 2613 deletions
|
@ -27,13 +27,11 @@ class Gem::Commands::WhichCommand < Gem::Command
|
|||
"--no-gems-first --no-all"
|
||||
end
|
||||
|
||||
def usage # :nodoc:
|
||||
"#{program_name} FILE [FILE ...]"
|
||||
end
|
||||
|
||||
def execute
|
||||
searcher = Gem::GemPathSearcher.new
|
||||
|
||||
found = false
|
||||
|
||||
options[:args].each do |arg|
|
||||
dirs = $LOAD_PATH
|
||||
spec = searcher.find arg
|
||||
|
@ -44,19 +42,19 @@ class Gem::Commands::WhichCommand < Gem::Command
|
|||
else
|
||||
dirs = $LOAD_PATH + gem_paths(spec)
|
||||
end
|
||||
|
||||
say "(checking gem #{spec.full_name} for #{arg})" if
|
||||
Gem.configuration.verbose and $stdout.tty?
|
||||
end
|
||||
|
||||
paths = find_paths arg, dirs
|
||||
|
||||
if paths.empty? then
|
||||
say "Can't find ruby library file or shared library #{arg}"
|
||||
alert_error "Can't find ruby library file or shared library #{arg}"
|
||||
else
|
||||
say paths
|
||||
found = true
|
||||
end
|
||||
end
|
||||
|
||||
terminate_interaction 1 unless found
|
||||
end
|
||||
|
||||
def find_paths(package_name, dirs)
|
||||
|
@ -80,7 +78,7 @@ class Gem::Commands::WhichCommand < Gem::Command
|
|||
end
|
||||
|
||||
def usage # :nodoc:
|
||||
"#{program_name} FILE [...]"
|
||||
"#{program_name} FILE [FILE ...]"
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue