diff options
Diffstat (limited to 'lib/rubygems/commands/unpack_command.rb')
-rw-r--r-- | lib/rubygems/commands/unpack_command.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rubygems/commands/unpack_command.rb b/lib/rubygems/commands/unpack_command.rb index 075dc04203..84a53b107a 100644 --- a/lib/rubygems/commands/unpack_command.rb +++ b/lib/rubygems/commands/unpack_command.rb @@ -41,7 +41,7 @@ class Gem::Commands::UnpackCommand < Gem::Command path = get_path name, options[:version] if path then - basename = File.basename(path).sub(/\.gem$/, '') + basename = File.basename(path, '.gem') target_dir = File.expand_path File.join(options[:target], basename) FileUtils.mkdir_p target_dir Gem::Installer.new(path, :unpack => true).unpack target_dir @@ -79,7 +79,7 @@ class Gem::Commands::UnpackCommand < Gem::Command # We expect to find (basename).gem in the 'cache' directory. # Furthermore, the name match must be exact (ignoring case). if gemname =~ /^#{selected.name}$/i - filename = selected.full_name + '.gem' + filename = selected.file_name path = nil Gem.path.find do |gem_dir| |