Created
July 30, 2012 19:18
-
-
Save jasonLaster/3209316 to your computer and use it in GitHub Desktop.
anonymous function fun
This file contains hidden or 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
# why can a proc be passed to an instance_eval and not a lambda? | |
b = binding | |
b.instance_eval {@x = 5} | |
b.instance_eval &(proc {puts @x}) | |
b.instance_eval &(lambda {puts @x}) |
Author
jasonLaster
commented
Jul 30, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment