Skip to content

Instantly share code, notes, and snippets.

@banister
Created November 25, 2011 04:50
Show Gist options
  • Save banister/876579b02f3628877459 to your computer and use it in GitHub Desktop.
Save banister/876579b02f3628877459 to your computer and use it in GitHub Desktop.
[1] (pry) main: 0> def baby
[1] (pry) main: 0* yield
[1] (pry) main: 0* end
=> nil
[2] (pry) main: 0> def pig
[2] (pry) main: 0* puts "hi"
[2] (pry) main: 0* end
=> nil
[3] (pry) main: 0> baby &method(:pig)
hi
=> nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment