From: Ruby Newbee Date: 2010-01-02T21:20:02+09:00 Subject: can't understand for this each Hello, Please take a look at below. what's each{ .. } in the find_all method? I can't understand for it. thanks. class Hash def find_all new_hash = Hash.new each { |k,v| new_hash[k] = v if yield(k, v) } new_hash end end squares = {0=>0, 1=>1, 2=>4, 3=>9} z=squares.find_all { |key, value| key > 1 } p z