diff options
Diffstat (limited to 'lib/rubygems/commands/which_command.rb')
-rw-r--r-- | lib/rubygems/commands/which_command.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/rubygems/commands/which_command.rb b/lib/rubygems/commands/which_command.rb index 99b9085b2b..18706afdf5 100644 --- a/lib/rubygems/commands/which_command.rb +++ b/lib/rubygems/commands/which_command.rb @@ -45,9 +45,9 @@ requiring to see why it does not behave as you expect. if spec then if options[:search_gems_first] then - dirs = gem_paths(spec) + $LOAD_PATH + dirs = spec.full_require_paths + $LOAD_PATH else - dirs = $LOAD_PATH + gem_paths(spec) + dirs = $LOAD_PATH + spec.full_require_paths end end @@ -81,10 +81,6 @@ requiring to see why it does not behave as you expect. result end - def gem_paths(spec) - spec.require_paths.collect { |d| File.join spec.full_gem_path, d } - end - def usage # :nodoc: "#{program_name} FILE [FILE ...]" end |