Robert Klemme wrote in post #1130727:
> On Mon, Dec 16, 2013 at 2:19 PM, Matthew Kerwin <lists / ruby-forum.com>
> wrote:
>> Probably because I'd have expected g(1,2) to print
>>> 1
>>> [2]
>>> 1
>>
>> and g(1,2,3,4,5) to print
>>> 1
>>> [2,3,4,5]
>>> 1
>
> In other words: Gandalf, what you ask for is ambiguous.  The parser
> cannot decide whether g(1,2) should give 1, [], 2 or 1, 2, 1.  There
> is no automated way to decide this unless some priorities are given
> with regard to args with * and those with default value.

There is the following sensible rule: it should always be possible to 
assign to any parameter.
That's pretty natural to me, but maybe this is subjective and it would 
make Ruby less intuitive.

-- 
Posted via http://www.ruby-forum.com/.