From: "kddnewton (Kevin Newton) via ruby-core" Date: 2024-01-26T18:52:12+00:00 Subject: [ruby-core:116459] [Ruby master Bug#20217] void value not checked for begin/ensure/rescue 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/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/