Closed Earlopain closed 3 weeks ago
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.
[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]$
I think this is the case for next too: next while false is valid in Ruby but invalid with Prism.
next
next while false
Fixed by https://github.com/ruby/prism/pull/2912
Questionmark since I'm not sure what this code would even mean.
Prism rejects this, saying break is invalid at this point. Ruby happily executes it though.