On Wed, Jul 10, 2013 at 11:16 AM, Yorick Peterse
<yorickpeterse / gmail.com> wrote:
> The problem, at least with MRI, is that the moment you do something
> similar with methods that are written in C all meaningful information is
> lost:
>
>     String.instance_method(:gsub).parameters # => [[:rest]]
>
> This is false since gsub has at least 1 required argument. This happens
> with a lot of methods (if not all) in MRI that are implemented in C.
> Jruby is also affected by this (at least with the above example).
> Rubinius is thus far the only implementation that gets this right that I
> know of.

Yes, that is the reason I filed this feature. :-)

Rubinius diverges from everyone else here and presents its own
argument list for #parameters rather than presenting the same
information as MRI. I would like to see #parameters reflect meaningful
information for even native methods, but the JRuby policy is to not
unilaterally make such decisions.

We could (and at one point, did) present the same data as Rubinius,
but up to now we have chosen to match MRI.

- Charlie