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

Prism rejects valid (?) syntax that CRuby accepts: break while false #2841

Closed
Earlopain opened this issue May 24, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@Earlopain
Copy link
Contributor

Questionmark since I'm not sure what this code would even mean.

break while false

Prism rejects this, saying break is invalid at this point. Ruby happily executes it though.

image

[user@DESKTOP-PC ruby-prism]$ ruby --version
ruby 3.4.0dev (2024-05-24T16:36:54Z master 47f0965269) [x86_64-linux]
[user@DESKTOP-PC ruby-prism]$ ruby test.rb
[user@DESKTOP-PC ruby-prism]$ 
@Earlopain Earlopain changed the title Prism rejects valid (?) syntax that CRuby accepts Prism rejects valid (?) syntax that CRuby accepts: break while false May 24, 2024
@kddnewton kddnewton added the bug Something isn't working label May 28, 2024
@kddnewton kddnewton added this to the CRuby unblocked milestone May 28, 2024
@st0012
Copy link
Member

st0012 commented Jun 21, 2024

I think this is the case for next too: next while false is valid in Ruby but invalid with Prism.

@kddnewton
Copy link
Collaborator

Fixed by #2912

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants