You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
JRuby apparently didn't even properly support #arity for Java proxy methods before 9.0.3.0 (see jruby/jruby@013e288), so this implements a workaround for these versions.
The workaround essentially makes use of Java's introspection to figure out matching methods (which could be more than one partly because Java supports multiple overloads, and partly because JRuby introduces aliases to make method names look more Rubyesque). If there is only a single match, we can use that methods arity directly instead of the default -1 arity.
One could in theory do better than -1 for various overload sets with multiple methods in them as well, but we have to draw a line somewhere.
Given that this issue also impacts JRuby 1.7.x in 1.8-mode, it would require guards around all the #parameters calls to integrate it into the existing workaround, and thus it is implemented as a separate workaround.
0 commit comments