Open fniephaus opened 4 years ago
This is going to be a little bit tricky because the arity check must happen inside the method per Ruby semantics. So we'll have to translate ArgumentError to ArityException, but ideally only for "wrong number of arguments" ArgumentErrors, because the user could just raise ArgumentError, "message"
which probably shouldn't become ArityException.
Translate ArgumentError to ArityException would be a good first step though.
invokeMember
should throw anArityException
in case the number of arguments is incorrect. At the moment, it throws a TruffleRuby-internalArgumentError
instead.