-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Labels
Milestone
Description
Environment
Provide at least:
- JRuby version
9.1.6.0 - Operating system and platform
OS X El Capitan
Other relevant info you may wish to add:
- Installed or activated gems
none - Application/framework version (e.g. Rails, Sinatra)
none - Environment variables
none
Expected Behavior
$ ruby -v
ruby 2.4.0dev (2016-11-27 trunk 56907) [universal.x86_64-darwin15]
$ ruby -e 'proc{|k:|p k}.call(k: 1)'
1
$ ruby -e 'proc{|a, k:|p k}.call(0, k: 1)'
1
Keyword arguments of Proc should works even if there is a positional parameter.
Actual Behavior
$ ~/ruby/jruby-9.1.6.0/bin/jruby -v
jruby 9.1.6.0 (2.3.1) 2016-11-09 0150a76 Java HotSpot(TM) 64-Bit Server VM 25.25-b02 on 1.8.0_25-b17 +jit [darwin-x86_64]
$ jruby -e 'proc{|k:| p k}.call(k: 1)'
1
$ jruby -e 'proc{|a, k:| p k}.call(0, k: 1)'
ArgumentError: missing keyword: k
block in -e at -e:-1
<main> at -e:3
JRuby can't pass an argument to the required keyword argument of a Proc if there is a positional parameter too.
Reactions are currently unavailable