Created
March 14, 2013 14:18
-
-
Save jacegu/5161683 to your computer and use it in GitHub Desktop.
Weird behavior between ruby versions with ->{ } proc syntax. Any explanation?
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
#ruby 1.9.2-p320 | |
BasicObject.new.instance_eval { ->{} } | |
#NoMethodError: undefined method `lambda' for #<BasicObject:0x007f97eb198590> | |
# from (irb):6:in `block in irb_binding' | |
# from (irb):6:in `instance_eval' | |
# from (irb):6 | |
# from /Users/jacegu/.rbenv/versions/1.9.2-p320/bin/irb:12:in `<main>' | |
#ruby 1.9.3-p392 | |
BasicObject.new.instance_eval { ->{} } | |
=> #<Proc:0x007f9f398ed7c8@(irb):1 (lambda)> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://bugs.ruby-lang.org/issues/5966