Skip to content

Instantly share code, notes, and snippets.

@brixen
Created August 12, 2011 22:18
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brixen/1143124 to your computer and use it in GitHub Desktop.
Save brixen/1143124 to your computer and use it in GitHub Desktop.
# Ruby 1.8
m { }
arity: -1
proc call arg check: no
wraps values: n/a
m { || }
arity: 0
proc call arg check: yes, 0
wraps values: n/a
m { |a| }
arity: 1
proc call arg check: no
wraps values: 1+
m { |a, | }
arity: 1
proc call arg check: yes, 1
wraps values: no
m { |a, *| }
arity: -2
proc call arg check: yes, 1+
wraps values: no
m { |a, *b| }
arity: -2
proc call arg check: yes, 1+
wraps values: for b
m { |*| }
arity: -1
proc call arg check: no
wraps values: n/a
m { |*a| }
arity: -1
proc call arg check: no
wraps values: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment