Created
October 23, 2012 09:03
-
-
Save hakanensari/3937759 to your computer and use it in GitHub Desktop.
Can't instance_exec curried proc in JRuby?
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
foo = lambda { |x, y| x + y } | |
instance_exec 1, 2, &foo # => 3 | |
bar = foo.curry.call(1) | |
instance_exec 2, &bar # NameError: undefined local variable or method `arity' for main:Object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment