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

Already on GitHub? Sign in to your account

crash when return in block #664

Closed
mattn opened this Issue Dec 21, 2012 · 0 comments

Comments

Projects
None yet
2 participants
Contributor

mattn commented Dec 21, 2012

I know this is invalid code.

[1,2,3].each do |x|
  return
end

on cruby:

bug.rb:4:in `block in <main>': unexpected return (LocalJumpError)
        from bug.rb:3:in `each'
        from bug.rb:3:in `<main>'

but mruby crash.

@matz matz closed this in 40ea525 Dec 21, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment