From: gabriele renzi Date: 2003-11-19T16:17:17+09:00 Subject: Re: Again, Rite explanation needed (keyword args and new hash syntax) il Wed, 19 Nov 2003 13:37:35 +1100, Greg McIntyre ha scritto:: well, I answer based on keyword args as I think they will work... > >Is the double asterisk (**) especially for grouping the rest of the >arguments into a hash the same way that a single asterisk groups the >rest of the arguments into an array? yes, and I bet matz would allow method_with_kwd_args (**hash ) just likwe we do method_with_blk(&proc) or method_with_variable_args(*proc) > If so, > > f(1,b:5,6,7,8) # => ? runtime error? I think so >Can I still use position to in the argument list and forgo the >keywordiness? > > f(1,5) # => [1,5,{}] yes you can >Can I change the order of the arguments or leave as many as I like out? >Shouldn't that be included in the primary example of this? It is the >point, isn't it? exactly > def g(a:1,b:2,c:3) > [a,b,c] > end > > g(c:5,b:6) # => [1, 6, 5] > >Is that right? I think this is right