[ruby-core:118866] [Ruby master Bug#20680] No "void context" warning for literals/etc. in ensure block

17 Aug
2024
17 Aug
'24
9:57 a.m.
Issue #20680 has been reported by Earlopain (A S). ---------------------------------------- Bug #20680: No "void context" warning for literals/etc. in ensure block https://bugs.ruby-lang.org/issues/20680 * Author: Earlopain (A S) * Status: Open * ruby -v: 3.3.4 * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- Providing this code, I would expect ruby to emit a void context warning: ```rb begin foo rescue bar ensure 42 end ``` `ensure` blocks don't return a value unless `return` is used explicitly. Am I right in my assumption that this should theoretically emit a warning? -- https://bugs.ruby-lang.org/
353
Age (days ago)
353
Last active (days ago)
0 comments
1 participants
participants (1)
-
Earlopain (A S)