aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/version.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-01 21:50:14 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-01 21:50:14 +0000
commiteffdbf5936cc090a618e13c8f9a1b5412ebab2fa (patch)
treec8410a18cbbe7ad013470fc06fef0c75ce0fd230 /lib/rubygems/version.rb
parent9c4ef4b191a1e6b9abdbb21c7c709d1d0f2397e6 (diff)
downloadruby-effdbf5936cc090a618e13c8f9a1b5412ebab2fa.tar.gz
* lib/rubygems: Update to RubyGems HEAD(c202db2).
this version contains many enhancements see http://git.io/vtNwF * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/version.rb')
-rw-r--r--lib/rubygems/version.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/rubygems/version.rb b/lib/rubygems/version.rb
index c581aa367f..e2ee59a0c2 100644
--- a/lib/rubygems/version.rb
+++ b/lib/rubygems/version.rb
@@ -232,11 +232,11 @@ class Gem::Version
# same precision. Version "1.0" is not the same as version "1".
def eql? other
- self.class === other and @version == other.version
+ self.class === other and @version == other._version
end
def hash # :nodoc:
- @hash ||= segments.hash
+ @version.hash
end
def init_with coder # :nodoc:
@@ -333,7 +333,7 @@ class Gem::Version
def <=> other
return unless Gem::Version === other
- return 0 if @version == other.version
+ return 0 if @version == other._version
lhsegments = segments
rhsegments = other.segments
@@ -357,4 +357,10 @@ class Gem::Version
return 0
end
+
+ protected
+
+ def _version
+ @version
+ end
end