It is character by character comparison in ASCII.
'10:' < '1:'
is (49 < 49) || (48 < 58) || (58 < ?)
#=> true
'1:' < '2:'
is (49 < 50) || (58 < 58)
#=> true
Left to Right boolean check is used and check breaks where true is found.
Note: It is just my observation over various example patterns.