Skip to content

Instantly share code, notes, and snippets.

@zotherstupidguy
Last active November 16, 2016 17:45
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 zotherstupidguy/71e45dc0cb1de7e3eb38a89931c808cf to your computer and use it in GitHub Desktop.
Save zotherstupidguy/71e45dc0cb1de7e3eb38a89931c808cf to your computer and use it in GitHub Desktop.
nested methods
def a &block
p "a"
def b &block
p "b"
def c &block
p "c"
instance_eval &block
end
instance_eval &block
undef :c
end
instance_eval &block
undef :b
end
# Works
a do
b do
c do
end
end
end
# Doesn't Work
b do
end
c do
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment