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]]

Copy link

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 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
Copy link

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 2489_fix branch January 21, 2015 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

Proc.parameters return an empty array
3 participants