From: darren kirby Date: 2008-04-01T12:05:45+09:00 Subject: assignment if key_exist? in Hash Hi all, I have a bunch of lines like: > foo = some_hash["some_key"] if some_hash.has_key?("some_key") This feels awkward and cumbersome, so I would imagine there is a more idiomatic way to write it. Thanks, -d -- darren kirby :: Part of the problem since 1976 :: http://badcomputer.org "...the number of UNIX installations has grown to 10, with more expected..." - Dennis Ritchie and Ken Thompson, June 1972