From: Stefan Kaes Date: 2005-11-22T23:46:58+09:00 Subject: Re: semenatics of if/unless/while statement modifiers Ara.T.Howard wrote: > On Tue, 22 Nov 2005, Stefan Kaes wrote: > >> URABE Shyouhei wrote: >> >>> >>> On 22 Nov 2005, at 15:57, Stefan Kaes wrote: >>> >>>> This doesn't solve the problem of accessing the hash twice and >>>> computing the hash of the lookup key twice. And it's even more text >>>> than before. >>> >>> >>> >>> f(options.fetch(:x){raise}) rescue nil >>> >>> Don't know if it's elegant though >>> >>> >>> >> Neither elegant nor efficient. And don't ask me whether it's >> intuitive or understandable. > > > i use this > > harp:~ > cat a.rb > options = {:x => 42} > alias f puts > > x = options[:x] and f x > > harp:~ > ruby a.rb > 42 > > -a I'm afraid I don't understand what you're driving at, although I have read the Hitchhiker's guide. Maybe there's some fine irony hidden here, but I just don't get it. Sorry. -- stefan