diff options
Diffstat (limited to 'lib/rubygems/source/installed.rb')
| -rw-r--r-- | lib/rubygems/source/installed.rb | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/rubygems/source/installed.rb b/lib/rubygems/source/installed.rb index 300491e467..f5c96fee51 100644 --- a/lib/rubygems/source/installed.rb +++ b/lib/rubygems/source/installed.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true + ## # Represents an installed gem. This is used for dependency resolution. class Gem::Source::Installed < Gem::Source - def initialize # :nodoc: @uri = nil end @@ -11,7 +11,7 @@ class Gem::Source::Installed < Gem::Source ## # Installed sources sort before all other sources - def <=> other + def <=>(other) case other when Gem::Source::Git, Gem::Source::Lock, @@ -21,21 +21,19 @@ class Gem::Source::Installed < Gem::Source 0 when Gem::Source then 1 - else - nil end end ## # We don't need to download an installed gem - def download spec, path + def download(spec, path) nil end - def pretty_print q # :nodoc: - q.text '[Installed]' + def pretty_print(q) # :nodoc: + q.object_group(self) do + q.text "[Installed]" + end end - end - |
