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
merged 2 commits into from Jan 21, 2015

Conversation

Projects
None yet
3 participants
@Who828
Copy link
Contributor

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

@enebo

This comment has been minimized.

Copy link
Member

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();)

@Who828

This comment has been minimized.

Copy link
Contributor Author

Who828 commented Jan 21, 2015

@enebo Sure, fixed them for this PR.

headius added a commit that referenced this pull request Jan 21, 2015

Merge pull request #2492 from Who828/2489_fix
Implemented support for keyword and keywordrest proc /lambda parameters

@headius headius merged commit f7cf5a4 into jruby:master Jan 21, 2015

1 check was pending

continuous-integration/travis-ci The Travis CI build is in progress
Details
@headius

This comment has been minimized.

Copy link
Member

headius commented Jan 21, 2015

Awesome, thank you.

@headius headius added this to the 9.0.0.0.pre2 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
You can’t perform that action at this time.