diff options
Diffstat (limited to 'lib/rubygems/source/installed.rb')
-rw-r--r-- | lib/rubygems/source/installed.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/rubygems/source/installed.rb b/lib/rubygems/source/installed.rb new file mode 100644 index 0000000000..7709778791 --- /dev/null +++ b/lib/rubygems/source/installed.rb @@ -0,0 +1,28 @@ +class Gem::Source::Installed < Gem::Source + + def initialize + end + + ## + # Installed sources sort before all other sources + + def <=> other + case other + when Gem::Source::Installed then + 0 + when Gem::Source then + 1 + else + nil + end + end + + ## + # We don't need to download an installed gem + + def download spec, path + nil + end + +end + |