From: Robert Dober Date: 2007-01-09T00:33:32+09:00 Subject: Re: a most undangerous Hash#store! ------=_Part_26321_4599331.1168270409985 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 1/8/07, Mauricio Fernandez wrote: > > Anyway, Trans was talking about destructive updates, so what about > > def store?(key, value) make that store!? (I know you can't) because I consider an updating predicate *dangerous*, or were you just pulling our legs ;) unless key?(key) > store(key,value) > return true > end > false > end similar to the #store! he described, but with a more regular behavior when > you > have nil/false values... > > -- > Mauricio Fernandez - http://eigenclass.org - singular Ruby > > Robert -- "The real romance is out ahead and yet to come. The computer revolution hasn't started yet. Don't be misled by the enormous flow of money into bad defacto standards for unsophisticated buyers using poor adaptations of incomplete ideas." - Alan Kay ------=_Part_26321_4599331.1168270409985--