lib/run_loop/version.rb in run_loop-1.2.2 vs lib/run_loop/version.rb in run_loop-1.2.3

- old
+ new

@@ -1,7 +1,7 @@ module RunLoop - VERSION = '1.2.2' + VERSION = '1.2.3' # A model of a software release version that can be used to compare two versions. # # Calabash and RunLoop try very hard to comply with Semantic Versioning rules. # However, the semantic versioning spec is incompatible with RubyGem's patterns @@ -146,14 +146,17 @@ if a.patch != b.patch return a.patch.to_i > b.patch.to_i ? 1 : -1 end - return 1 if a.pre and (not b.pre) - return -1 if (not a.pre) and b.pre + return -1 if a.pre and (not a.pre_version) and b.pre_version + return 1 if a.pre_version and b.pre and (not b.pre_version) - return 1 if a.pre_version and (not b.pre_version) - return -1 if (not a.pre_version) and b.pre_version + return -1 if a.pre and (not b.pre) + return 1 if (not a.pre) and b.pre + + return -1 if a.pre_version and (not b.pre_version) + return 1 if (not a.pre_version) and b.pre_version if a.pre_version != b.pre_version return a.pre_version.to_i > b.pre_version.to_i ? 1 : -1 end 0