aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/source/vendor.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/source/vendor.rb')
-rw-r--r--lib/rubygems/source/vendor.rb18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/rubygems/source/vendor.rb b/lib/rubygems/source/vendor.rb
index f2cf540c8d..244c4201d8 100644
--- a/lib/rubygems/source/vendor.rb
+++ b/lib/rubygems/source/vendor.rb
@@ -3,8 +3,22 @@
class Gem::Source::Vendor < Gem::Source::Installed
- def initialize uri
- @uri = uri
+ ##
+ # Creates a new Vendor source for a gem that was unpacked at +path+.
+
+ def initialize path
+ @uri = path
+ end
+
+ def <=> other
+ case other
+ when Gem::Source::Vendor then
+ 0
+ when Gem::Source then
+ 1
+ else
+ nil
+ end
end
end