Open
Description
invokeMember
should throw an ArityException
in case the number of arguments is incorrect. At the moment, it throws a TruffleRuby-internal ArgumentError
instead.
$ polyglot --jvm --shell
rGraalVM MultiLanguage Shell 19.3.0
Copyright (c) 2013-2019, Oracle and/or its affiliates
Ruby version 2.6.2
ruby> Truffle::Interop.invoke([], :+)
wrong number of arguments (given 0, expected 1) (ArgumentError)
at <ruby> <top (required)>(resource:/truffleruby/core/truffle/boot.rb:16:15-45)
at <ruby> parsing-request(Unknown)
js> Polyglot.eval('python', '[]').append()
TypeError: append() missing 1 required positional argument: a
js> Polyglot.eval('ruby', '[]').delete()
wrong number of arguments (given 0, expected 1) (ArgumentError)