
26 Jan
2024
26 Jan
'24
12:52 p.m.
Issue #20217 has been reported by kddnewton (Kevin Newton). ---------------------------------------- Bug #20217: void value not checked for begin/ensure/rescue https://bugs.ruby-lang.org/issues/20217 * Author: kddnewton (Kevin Newton) * Status: Open * Priority: Normal * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- ```ruby foo = begin return ensure end ``` I would expect this to raise a syntax error for a void value expression being assigned, but the `ensure` makes it so that this isn't checked. -- https://bugs.ruby-lang.org/