[ruby-core:117434] [Ruby master Bug#20409] Missing reporting some invalid breaks
Issue #20409 has been reported by kddnewton (Kevin Newton). ---------------------------------------- Bug #20409: Missing reporting some invalid breaks https://bugs.ruby-lang.org/issues/20409 * Author: kddnewton (Kevin Newton) * Status: Open * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- -- https://bugs.ruby-lang.org/
Issue #20409 has been updated by kddnewton (Kevin Newton). Sorry hit enter too soon... ```ruby def a break rescue b while c end ``` ``` def a break ensure b while c end ``` ---------------------------------------- Bug #20409: Missing reporting some invalid breaks https://bugs.ruby-lang.org/issues/20409#change-107811 * Author: kddnewton (Kevin Newton) * Status: Open * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- -- https://bugs.ruby-lang.org/
Issue #20409 has been updated by kddnewton (Kevin Newton). I think ```ruby END { break } ``` should also be a syntax error, as it seems to always result in a `LocalJumpError`, but I could be wrong. ---------------------------------------- Bug #20409: Missing reporting some invalid breaks https://bugs.ruby-lang.org/issues/20409#change-107812 * Author: kddnewton (Kevin Newton) * Status: Open * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- -- https://bugs.ruby-lang.org/
Issue #20409 has been updated by nobu (Nobuyoshi Nakada). It reproduces only with a modifier `while`/`until`, even without `rescue`/`ensure`. ```ruby begin break nil while false end ``` ---------------------------------------- Bug #20409: Missing reporting some invalid breaks https://bugs.ruby-lang.org/issues/20409#change-107815 * Author: kddnewton (Kevin Newton) * Status: Open * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- -- https://bugs.ruby-lang.org/
Issue #20409 has been updated by Earlopain (Earlopain _). Today I get a syntax error for all the examples in both parsers except for `END { break }`. Can this be closed or should `END { break }` still be considered? ---------------------------------------- Bug #20409: Missing reporting some invalid breaks https://bugs.ruby-lang.org/issues/20409#change-115046 * Author: kddnewton (Kevin Newton) * Status: Open * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- -- https://bugs.ruby-lang.org/
Issue #20409 has been updated by Earlopain (Earlopain _). I think `END` should be syntax error. The same is already true for `BEGIN`, seems inconsistent. ---------------------------------------- Bug #20409: Missing reporting some invalid breaks https://bugs.ruby-lang.org/issues/20409#change-115055 * Author: kddnewton (Kevin Newton) * Status: Open * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- -- https://bugs.ruby-lang.org/
Issue #20409 has been updated by kddnewton (Kevin Newton). I think `END { break }` should still be a syntax error, as it always results in an error. ---------------------------------------- Bug #20409: Missing reporting some invalid breaks https://bugs.ruby-lang.org/issues/20409#change-115056 * Author: kddnewton (Kevin Newton) * Status: Open * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- -- https://bugs.ruby-lang.org/
Issue #20409 has been updated by Earlopain (Earlopain _). I added it to the dev meeting and implemented it in https://github.com/ruby/prism/pull/3707 ---------------------------------------- Bug #20409: Missing reporting some invalid breaks https://bugs.ruby-lang.org/issues/20409#change-115085 * Author: kddnewton (Kevin Newton) * Status: Open * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- -- https://bugs.ruby-lang.org/
participants (3)
-
Earlopain (Earlopain _) -
kddnewton (Kevin Newton) -
nobu (Nobuyoshi Nakada)