Guy's Ruby: > pigeon% ruby -v > ruby 1.5.5 (2000-08-09) [i686-linux] > A> Hash#[]= shouldn't delete when said hash[key]=nil . Guy: > pigeon% ruby -e 'a = {1 => 2}; a[1] = nil; p a' > {1=>nil} > pigeon% And: > A> ruby -e's="foo bar"; m1=/bar/.match s; m2=/foo/.match s; p > m1[0...1];' > A> ["foo"] Guy: > pigeon% ruby -e's="foo bar"; m1=/bar/.match s; m2=/foo/.match > s; p m1[0...1];' > ["bar"] Great! They work probably differently on 1.4 series. Matz is much faster than I am :). Maybe I should start moving to 1.5 series.. Me: > A> Hash#sort could have calling form with block. Guy: > I've not understood this : > pigeon% cat b.rb > #!/usr/bin/ruby > a = {1 => 2, 3 => 4} > b = a.sort {|x| x[1][0] <=> x[0][0] } > p b > pigeon% b.rb > [[3, 4], [1, 2]] This one I clearly didn't check. I relied on rubycentral's description: sort hsh.sort -> anArray Converts hsh to a nested array of [ key, value ] arrays and sorts it. See also Array#sort While it's basically right, it doesn't say anything about block form. Neither what's passed to block. While current way might does the job I have to say it's very ackward to me. Other sorts (Enumerabled) are passed |a,b|. That would have been more natural to me. On the case of hashes I might consider even |a_key, a_value, b_key, b_value|. Thanks for noting these. - Aleksi