hrstt
7/5/2011 - 12:47 AM

Hash filtering

Hash filtering

x = { "one" => "one", "two" => "two", "three" => "three"}
y = x.reject {|key,value| key == "three" }
y == { "one" => "one", "two" => "two"}