Permalink
Browse files

Dropping VersionNumber#next, it is unused.

  • Loading branch information...
phs committed Apr 26, 2010
1 parent 6d929c6 commit 48edb725d56384dacecd35c708d17505e7725d88
Showing with 0 additions and 13 deletions.
  1. +0 −7 lib/versionable/version_number.rb
  2. +0 −6 spec/versionable/version_number_spec.rb
@@ -45,13 +45,6 @@ def ==(other)
(self <=> other) == 0
end
- # Bump to the next most-significant version number.
- #
- # VersionNumber.new("2.1").next.to_s # => "3"
- def next
- self.class.new(split('.', 2).first.to_i + 1)
- end
-
# Hash the version number string after stripping any trailing zeroes.
#
# This preserves the hash/equality contract: 2 == 2.0, so they both hash the same as well.
@@ -28,12 +28,6 @@ def v(version)
end
end
- describe "#next" do
- it "bumps most significant segment by 1 and drops remainder" do
- v("1.0").next.should == v("2")
- end
- end
-
describe "#hash" do
it "is the string hash after stripping trailing zero segments" do
v("1").hash.should == v("1.0.0.0.0").hash

0 comments on commit 48edb72

Please sign in to comment.