Hi,

In message "Re: Confusion Over Keyword Arguments"
    on Fri, 3 Mar 2006 02:30:34 +0900, Daniel Berger <Daniel.Berger / qwest.com> writes:

|>  foo(1, foo:3)     # (a=1, b={:foo=>3}) or (a=1,b=0,c=[{:foo=>3}])?
|
|Error.  There's no 'foo' parameter.  Passing a literal hash would require {}.

I'm not sure what you meant by "literal hash".  Do you mean foo:3 is
not legal since you don't have an argument with a name "foo"?

Have you changed your mind since the blog entry at
http://djberg96.livejournal.com/50162.html?  For you have written

>foo(1, 2, foo:4, bar:5) # a=1, b=2, c=[{'foo'=>4, 'bar'=>5}]
>foo(1, 2, 8, baz:5)     # a=1, b=2, c=[8, {'baz'=>5}]

in it.  foo:4 etc. seems like non-literal hash.

|>  args = [1, {:b=>2, foo=>5}]
|>  foo(*args)        # (a=1,b={:b=>2, foo=>5}) or (a=1,b=2,c=[{:foo=>5}])?
|
|a = 1, b = {:b=>2, foo=>5}, since you've passed a literal hash.

This means that you cannot accept

 (a) a keyword argument that is possibly accepted by the superclass's
     method, without knowing their names
 (b) arbitrary keywords that can be passed to other methods

Right? If so, (a) means you need to have exact argument information
about a superclass method, which may not be available for mix-in
modules; (b) means there's no way to convert keyword arguments to a
hash.

Am I missing something?

							matz.