public
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5
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]]

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.