ts <decoux / moulon.inra.fr> writes:

>>>>>> "D" == David A Black <dblack / wobblini.net> writes:
>
> D> I still have this nagging memory of a method that raises an exception
> D> when given both, but I can't pin it down.
>
> svg% ruby -e 'Hash.new("aa") {}'
> -e:1:in `initialize': wrong number of arguments (ArgumentError)
>         from -e:1:in `new'
>         from -e:1
> svg% 
>
> svg% ruby -e 'instance_eval("aa") {} '
> -e:1:in `instance_eval': wrong number of arguments (1 for 0) (ArgumentError)
>         from -e:1

Interestingly:

g@crash:~$ ruby -e 'Array.new(1, 1){1}'
-e:1: warning: block supersedes default value argument

But to answer David( Black)'s concern, I think the only sane choice is
to raise an exception when both are given.  It's ambiguous, so it's an
error, right?