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? does not work with nested blocks #2695

Closed
tsahara opened this issue Jan 6, 2015 · 0 comments
Closed

block_given? does not work with nested blocks #2695

tsahara opened this issue Jan 6, 2015 · 0 comments

Comments

@tsahara
Copy link
Member

tsahara commented Jan 6, 2015

looks 44c29e8 misses some cases.

def f
  loop do
    loop do
      p block_given?
      break
    end
    break
  end
end
f
% ruby -v c.rb
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-openbsd5.5]
false

% mruby c.rb
true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant