[Rubygems-developers] [ rubygems-Patches-27903 ] order string segments ending in numbers by numeric value

noreply at rubyforge.org noreply at rubyforge.org
Sun Feb 28 22:17:23 EST 2010


Patches item #27903, was opened at 2010-03-01 03:17
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=577&aid=27903&group_id=126

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: David Chelimsky (dchelimsky)
Assigned to: Nobody (None)
Summary: order string segments ending in numbers by numeric value

Initial Comment:
Version segments with any alpha chars are treated as strings, and ordered lexically. This creates a situation in which versions get ordered in unexpected ways:

2.0.0.a1
2.0.0.a10
2.0.0.a2
2.0.0.a3
etc

The attached patch adds tests and implementation that checks that the leading alpha chars match, and then extracts the trailing digits, converts them to integers, and compares based on their numeric values.



----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=577&aid=27903&group_id=126


More information about the Rubygems-developers mailing list