Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method#parameters doesn't annotate required parameters correctly #2918

Closed
nirvdrum opened this Issue May 8, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@nirvdrum
Copy link
Contributor

nirvdrum commented May 8, 2015

JRuby 9.0.0.0 incorrectly reports required parameters as "rest" in Method#parameters.

> ruby -v -e 'def m(x); end; p method(:m).parameters'
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
[[:req, :x]]
> bin/jruby -v -e 'def m(x); end; p method(:m).parameters'
jruby 9.0.0.0-SNAPSHOT (2.2.2) 2015-05-08 c957028 Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [linux-amd64]
[[:rest, :x]]

@nirvdrum nirvdrum added the JRuby 9000 label May 8, 2015

@nirvdrum

This comment has been minimized.

Copy link
Contributor Author

nirvdrum commented May 8, 2015

I haven't looked, but's probably shared logic with Proc#parameters. That suffers from the same problem.

@headius

This comment has been minimized.

Copy link
Member

headius commented May 8, 2015

JIT bug:

$ rvm jruby-9.0.0.0.pre2 do ruby -X-C -e 'def m(x); end; p method(:m).parameters'
[[:req, :x]]

Signature.decode/encode are probably busted.

@nirvdrum

This comment has been minimized.

Copy link
Contributor Author

nirvdrum commented May 8, 2015

I need to remember to check both. I guess that JITs fairly quickly now then.

@headius

This comment has been minimized.

Copy link
Member

headius commented May 8, 2015

The -e or target script always compile completely before executing unless you pass -X-C.

@headius headius closed this in be4196f May 8, 2015

@headius headius added core jit labels May 8, 2015

@headius headius added this to the JRuby 9.0.0.0.rc1 milestone May 8, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.