[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: a most undangerous Hash#store!

Peña, Botp

1/8/2007 4:13:00 AM

Trans [mailto:transfire@gmail.com] :

# # As with #store but adds the key/value pair
# # only if the key isn't already in the hash.

just a suggestion: *not another new method name (since we're still updating/merging, right?). just add an option --if possible ie

merge :nodup
update :nodup

merge require => :nodup
update require => :nodup

merge :safe
update :safe

merge require => :safe
update require => :safe