From: Csaba Henk Date: 2005-03-26T07:04:48+09:00 Subject: Re: RCR 296: Destructive methods return self On 2005-03-25, Florian Gross wrote: > Csaba Henk wrote: > >> On 2005-03-23, Florian Gross wrote: >> >>>We'll finally get keyword arguments in Rite and they're already in Ruby >>>1.9 as well. >> >> Are they in current CVS? And how to use them? I didn't find any info >> about it. > > Hm, I'm not sure if the support has already been added to def, but the > following ought to work: > > x(name: "Foobar", age: 100) def x *a a end x(name: "Foobar", age: 100) # => [{:name=>"Foobar", :age=>100}] x(:name => "Foobar", :age => 100) # => [{:name=>"Foobar", :age=>100}] Yep, it's not a big deal. This is just a not too useful syntax sugar (those colons before the keys were not uncomfortable at all). But, as you say, it's not finished yet. I hope at the end we get some reflection (Method#has_keyword?(:sym) or something along this line) otherwise it's just hype. Csaba