Created
January 8, 2014 19:05
-
-
Save korny/8322428 to your computer and use it in GitHub Desktop.
block_given? doesn't work in a delegating BasicObject
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
class Foo < BasicObject | |
def test_block_given? | |
block_given? | |
end | |
private | |
def method_missing(method, *args, &block) | |
3.send(method, *args, &block) | |
end | |
end | |
Foo.new.test_block_given? {} # => false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment