From: Yusuke ENDOH Date: 2011-05-25T22:54:31+09:00 Subject: [ruby-core:36461] Re: [Ruby 1.9 - Feature #4772] Hash#add_keys Hello, 2011/5/25 Rodrigo Rosenfeld Rosas : > Actually, as already noticed here, this could be just: > > ['a', 'b', 'c'].each {|k| hash[k]} # You don't need to assign to it. The assignment is needed. hash = Hash.new {|h,k| k + k.succ} ["a","b","c"].each {|k| hash[k] } p hash #=> {} <- LOOK! This feature might be useful to use a hash as a set... I'm not sure though. -- Yusuke Endoh