Created
July 8, 2013 13:20
-
-
Save gnufied/5948718 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo | |
def hello &block | |
instance_eval &block | |
end | |
end | |
a = 10 | |
b = Foo.new() | |
b.hello { |c| | |
puts a | |
} | |
#=> 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment