-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
It seems that Method#arity does not handle keyword arguments correctly in JRuby 10.0.0.0-SNAPSHOT.
Environment Information
Provide at least:
- JRuby version: jruby 10.0.0.0-SNAPSHOT (3.4.2) 2025-03-15 a4e4d7d OpenJDK 64-Bit Server VM 21+35-2513 on 21+35-2513 +indy +jit [x86_64-linux]
- Operating system and platform: Linux e19b5868bce9 6.10.14-linuxkit break script engine #1 SMP PREEMPT_DYNAMIC Mon Feb 24 16:37:44 UTC 2025 x86_64 GNU/Linux
Steps to reproduce
Run the following command:
$ jruby -v -e '
class C
def x(a, b: nil, &c)
end
end
c = C.new
p c.method(:x).arity
'Expected Behavior
jruby 10.0.0.0-SNAPSHOT (3.4.2) 2025-03-15 a4e4d7dc4c OpenJDK 64-Bit Server VM 21+35-2513 on 21+35-2513 +indy +jit [x86_64-linux]
-2Actual Behavior
jruby 10.0.0.0-SNAPSHOT (3.4.2) 2025-03-15 a4e4d7dc4c OpenJDK 64-Bit Server VM 21+35-2513 on 21+35-2513 +indy +jit [x86_64-linux]
1JRuby 9.4 returns the expected result:
jruby 9.4.12.0 (3.1.4) 2025-02-11 f4ab75096a OpenJDK 64-Bit Server VM 25.442-b06 on 1.8.0_442-b06 +jit [x86_64-linux]
-2CRuby 3.4 also returns the expected result:
ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +PRISM [x86_64-darwin24]
-2Metadata
Metadata
Assignees
Labels
No labels