Skip to content

Instantly share code, notes, and snippets.

@jasiek
Created January 2, 2012 16:16
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 jasiek/1551251 to your computer and use it in GitHub Desktop.
Save jasiek/1551251 to your computer and use it in GitHub Desktop.
ruby-1.9.3-p0 :001 > def f(x, y=1)
ruby-1.9.3-p0 :002?> method(__method__).parameters
ruby-1.9.3-p0 :003?> end
=> nil
ruby-1.9.3-p0 :004 > f(1, 2)
=> [[:req, :x], [:opt, :y]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment