Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Dropping VersionNumber#next, it is unused.

  • Loading branch information...
commit 48edb725d56384dacecd35c708d17505e7725d88 1 parent 6d929c6
@phs authored
View
7 lib/versionable/version_number.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.
View
6 spec/versionable/version_number_spec.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.