summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems/basic_specification.rb13
-rw-r--r--lib/rubygems/commands/pristine_command.rb6
-rw-r--r--lib/rubygems/specification_record.rb1
3 files changed, 4 insertions, 16 deletions
diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb
index f25756f92c..0380fceece 100644
--- a/lib/rubygems/basic_specification.rb
+++ b/lib/rubygems/basic_specification.rb
@@ -144,19 +144,6 @@ class Gem::BasicSpecification
end
##
- # Returns the full name of this Gem (see `Gem::BasicSpecification#full_name`).
- # Information about where the gem is installed is also included if not
- # installed in the default GEM_HOME.
-
- def full_name_with_location
- if base_dir != Gem.dir
- "#{full_name} in #{base_dir}"
- else
- full_name
- end
- end
-
- ##
# Full paths in the gem to add to <code>$LOAD_PATH</code> when this gem is
# activated.
diff --git a/lib/rubygems/commands/pristine_command.rb b/lib/rubygems/commands/pristine_command.rb
index 999c9fef0f..b272a15b6c 100644
--- a/lib/rubygems/commands/pristine_command.rb
+++ b/lib/rubygems/commands/pristine_command.rb
@@ -148,7 +148,7 @@ extensions will be restored.
end
unless spec.extensions.empty? || options[:extensions] || options[:only_executables] || options[:only_plugins]
- say "Skipped #{spec.full_name_with_location}, it needs to compile an extension"
+ say "Skipped #{spec.full_name}, it needs to compile an extension"
next
end
@@ -157,7 +157,7 @@ extensions will be restored.
unless File.exist?(gem) || options[:only_executables] || options[:only_plugins]
require_relative "../remote_fetcher"
- say "Cached gem for #{spec.full_name_with_location} not found, attempting to fetch..."
+ say "Cached gem for #{spec.full_name} not found, attempting to fetch..."
dep = Gem::Dependency.new spec.name, spec.version
found, _ = Gem::SpecFetcher.fetcher.spec_for_dependency dep
@@ -201,7 +201,7 @@ extensions will be restored.
installer.install
end
- say "Restored #{spec.full_name_with_location}"
+ say "Restored #{spec.full_name}"
end
end
end
diff --git a/lib/rubygems/specification_record.rb b/lib/rubygems/specification_record.rb
index 664d506265..dd6aa7eafa 100644
--- a/lib/rubygems/specification_record.rb
+++ b/lib/rubygems/specification_record.rb
@@ -68,6 +68,7 @@ module Gem
installed_stubs = installed_stubs(pattern)
installed_stubs.select! {|s| Gem::Platform.match_spec? s } if match_platform
stubs = installed_stubs + Gem::Specification.default_stubs(pattern)
+ stubs = stubs.uniq(&:full_name)
Gem::Specification._resort!(stubs)
stubs
end