Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

block_given? always returns false in loop block #2712

Closed
wants to merge 1 commit into from

Conversation

suzukaze
Copy link
Contributor

Fix #2695

block_given? always returns false in loop method.
loop method cannot recieve block.

I made sure #2665, #2678 are not destroyed.
#2703 The following code returns true.

def foo; define_singleton_method(:bar) { block_given? }; end; foo {}; bar
# => true

@matz matz closed this in 089f1f6 Jan 31, 2015
ghost pushed a commit to iij/mruby that referenced this pull request Feb 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

block_given? does not work with nested blocks
1 participant