Skip to content

Instantly share code, notes, and snippets.

@headius
Created February 24, 2012 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save headius/1901397 to your computer and use it in GitHub Desktop.
Save headius/1901397 to your computer and use it in GitHub Desktop.
system ~/projects/jruby $ jruby -e "foo = proc {|a, b = 1, *c, &d|}; p foo.parameters"
[[:opt, :a], [:opt, :b], [:rest, :c], [:block, :d]]
system ~/projects/jruby $ jruby -e "def foo(a, b = 1, *c, &d); end; p method(:foo).parameters"
[[:req, :a], [:opt, :b], [:rest, :c], [:block, :d]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment