Skip to content

Instantly share code, notes, and snippets.

@undecided
Created August 7, 2013 14:05
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 undecided/6174360 to your computer and use it in GitHub Desktop.
Save undecided/6174360 to your computer and use it in GitHub Desktop.
def a(p)
p.call()
raise "The world is safe"
end
def b
x = Proc.new { return Proc.new { return false } }
a(x).call
raise 'Maybe here, we might save the world. Let us do that.'
end
def c
b
raise 'Bang! Nuclear explosion. You are dead.'
end
c #=> Would you expect this to destroy the earth?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment