Rob Biedenharn wrote:
> a.sort do |h1,h2|
>   (h1['a'] <=> h2['a']).nonzero? || h1['b'] <=> h2['b']
> end
> 
> The Numeric#nonzero? is exactly for this kind of thing.  If its receiver 
> is 0 it returns nil so chaining with || will work.  (And you don't have 
> to compare the 'a' values twice.)
> 
> -Rob
> 
Neat, I didn't know about that.

Dan