However, if foo is defined from a Proc, it raises an ArgumentError (which it doesn't on MRI):
Object.send(:define_method,:foo){ |**o| o}defbar(*a)foo(*a)endbar(x: 42)# ArgumentError: wrong number of arguments (1 for 0)
It's expected to also return {:x=>42}.
The text was updated successfully, but these errors were encountered:
rkh
changed the title
Arity issues with define_method and keyword arguments
JRuby 9000: Arity issues with define_method and keyword arguments
Dec 15, 2014
The following works:
However, if
foo
is defined from aProc
, it raises anArgumentError
(which it doesn't on MRI):It's expected to also return
{:x=>42}
.The text was updated successfully, but these errors were encountered: