From: Trans Date: 2007-01-08T10:49:20+09:00 Subject: Re: a most undangerous Hash#store! Devin Mullins wrote: > Trans wrote: > > # As with #store but adds the key/value pair > > # only if the key isn't already in the hash. > Hrm. ActiveSupport has something similar. You can do > hash.reverse_merge(key => value). Astute! Indeed, I am using that too. Though I defined an operator for it instead: hash *= {key=>value} (I use + as an alias for regular merge, btw.) In general though I would prefer a simple conditional store method b/c it's (probably) more efficient for a small numbers of entries and it also reads better. T.