From: Alex Fenton Date: 2004-12-15T07:02:16+09:00 Subject: no-argument sort() Hi I tried the code below- I thought [a, b].sort was always the same as [a, b].sort { | x, y | x <=> y } and don't understand why it's not in this case. The String subclass method doesn't seem to get called in the no-arg version? Thanks alex --- class Fragment < String def <=>(other) p "Called subclassed method" = super end end a = Fragment.new('abc') x = Fragment.new('xyz') p a < x p x <= a p [x, a].sort p [x, a].sort { | i, j | i <=> j }