Skip to content

Instantly share code, notes, and snippets.

@jcoglan
Created April 28, 2015 12:33
Show Gist options
  • Save jcoglan/0a37aee2582877b27920 to your computer and use it in GitHub Desktop.
Save jcoglan/0a37aee2582877b27920 to your computer and use it in GitHub Desktop.
def foo(&block)
p [:foo, 1]
block.call
p [:foo, 2]
end
def bar(&block)
p [:bar, 1]
foo(&block)
p [:bar, 2]
end
def baz
p [:baz, 1]
bar { return }
p [:baz, 2]
end
baz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment