Skip to content

Reject END { break } for Ruby 3.5#3707

Open
Earlopain wants to merge 1 commit intoruby:mainfrom
Earlopain:end-block-exit
Open

Reject END { break } for Ruby 3.5#3707
Earlopain wants to merge 1 commit intoruby:mainfrom
Earlopain:end-block-exit

Conversation

@Earlopain
Copy link
Copy Markdown
Collaborator

@Earlopain Earlopain commented Nov 6, 2025

@Earlopain Earlopain force-pushed the end-block-exit branch 2 times, most recently from 089fcda to 6eb14b3 Compare November 6, 2025 09:30
Comment thread src/prism.c Outdated
@Earlopain Earlopain force-pushed the end-block-exit branch 2 times, most recently from d5bf5b1 to fc5f985 Compare December 13, 2025 14:47
@kddnewton
Copy link
Copy Markdown
Collaborator

Do we know if this is mergable yet?

@Earlopain
Copy link
Copy Markdown
Collaborator Author

I think this was OKed in a dev meeting. I will check and clean this up

@Earlopain
Copy link
Copy Markdown
Collaborator Author

https://github.com/ruby/dev-meeting-log/blob/f76ba7e3f69feaff70672f0077976d7f63313601/2025/DevMeeting-2025-11-13.md#bug-20409-missing-reporting-some-invalid-breaks-kddnewton

I think this is accepted, END { break } at least? Can't tell for sure. For reference, I tested again how it currently behaves:

END
return - runtime error
break - runtime error
next - ok

BEGIN
return - ok
break - syntax error
next - syntax error

Currently I have return in end still accepted but it also leads to a runtime error. I guess this can be merged as is after rebase, what do you think?

@kddnewton
Copy link
Copy Markdown
Collaborator

Yeah I think this can be merged as is and we can roll with it.

@kddnewton kddnewton removed the blocked label Feb 22, 2026
@kddnewton
Copy link
Copy Markdown
Collaborator

Actually sorry I read through the meeting notes and I think this is still not resolved.

@kddnewton kddnewton marked this pull request as ready for review April 22, 2026 13:45
@kddnewton
Copy link
Copy Markdown
Collaborator

@Earlopain matz said this is good to go for 4.1, can you rebase?

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.

3 participants