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

Implemented support for keyword and keywordrest proc /lambda parameters #2492

merged 2 commits into from Jan 21, 2015


Copy link

@Who828 Who828 commented Jan 21, 2015

Fixes #2489 by adding support for keyword/keywordrest for proc/lambda parameters.

bin/jruby -e "p proc {|a, b = 1, *c, d, e:1, f:, **g|}.parameters"
#[[:opt, :a], [:opt, :b], [:rest, :c], [:opt, :d], [:key, :e], [:keyreq, :f], [:keyrest, :g]]
bin/jruby -e "p lambda {|a, b = 1, *c, d, e:1, f:, **g|}.parameters"
#[[:req, :a], [:opt, :b], [:rest, :c], [:req, :d], [:key, :e], [:keyreq, :f], [:keyrest, :g]]
@Who828 Who828 force-pushed the Who828:2489_fix branch from 9af62b2 to 357dbd6 Jan 21, 2015
Copy link

@enebo enebo commented Jan 21, 2015

@Who828 for next PR remember that single line if statements should always have curly braces { } unless if is entirely on one line (e.g. if (foo) bar();)

Copy link
Contributor Author

@Who828 Who828 commented Jan 21, 2015

@enebo Sure, fixed them for this PR.

headius added a commit that referenced this pull request Jan 21, 2015
Implemented support for keyword and keywordrest proc /lambda parameters
@headius headius merged commit f7cf5a4 into jruby:master Jan 21, 2015
1 check was pending
1 check was pending
continuous-integration/travis-ci The Travis CI build is in progress
Copy link

@headius headius commented Jan 21, 2015

Awesome, thank you.

@headius headius added this to the milestone Jan 21, 2015
@headius headius self-assigned this Jan 21, 2015
@Who828 Who828 deleted the Who828:2489_fix branch Jan 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants