Skip to content

Instantly share code, notes, and snippets.

@jcoglan
Created April 28, 2015 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • 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