Skip to content
Browse files

bugfix

  • Loading branch information...
1 parent e01dde8 commit 9d1a5bd9f4dda3cfb5c9dbb090a0e1b658678433 reiz committed Apr 6, 2012
Showing with 7 additions and 3 deletions.
  1. +1 −1 README.markdown
  2. +1 −1 lib/naturalsorter/version.rb
  3. +1 −1 lib/versioncmp.rb
  4. +4 −0 spec/versioncmp_spec.rb
View
2 README.markdown
@@ -49,7 +49,7 @@ Get newest.
You should add this line to your Gemfile
-`gem 'naturalsorter', '0.2.3'`
+`gem 'naturalsorter', '0.3.0'`
and run this command in your app root directory
View
2 lib/naturalsorter/version.rb
@@ -1,3 +1,3 @@
module Naturalsorter
- VERSION = "0.2.4"
+ VERSION = "0.3.0"
end
View
2 lib/versioncmp.rb
@@ -105,7 +105,7 @@ def self.checkForRC(a, b)
end
elsif (Versioncmp.isPre(big))
bigwithoutPre = big.gsub(/\.pre[1-9]*$/i, "")
- bigwithoutPre = bigwithoutPre..gsub(/\-pre[1-9]*$/i, "")
+ bigwithoutPre = bigwithoutPre.gsub(/\-pre[1-9]*$/i, "")
if (Versioncmp.compareString(bigwithoutPre, small) == 0)
return Versioncmp.getRcValue(a, b)
end
View
4 spec/versioncmp_spec.rb
@@ -54,6 +54,10 @@
Versioncmp.compare("3.1-jbossorg-1", "3.1").should eql(-1)
end
+ it "smaller 3.1-pre1" do
+ Versioncmp.compare("3.1-pre1", "3.1").should eql(-1)
+ end
+
it "bigger RC" do
Versioncmp.compare("1.1.rc3", "1.1.rc2").should eql(1)
end

0 comments on commit 9d1a5bd

Please sign in to comment.
Something went wrong with that request. Please try again.