From: alxtskrnk@... Date: 2015-05-12T17:42:31+00:00 Subject: [ruby-core:69150] [Ruby trunk - Bug #11143] [Open] it should always be possible to return from an if Issue #11143 has been reported by bug hit. ---------------------------------------- Bug #11143: it should always be possible to return from an if https://bugs.ruby-lang.org/issues/11143 * Author: bug hit * Status: Open * Priority: Normal * Assignee: * ruby -v: * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- ``` irb(main):001:0> def foo; a = if true then return end end SyntaxError: (irb):1: void value expression ``` it should not matter that you are not producing a value for the if expression, since you are leaving the method immediately. This should also apply to other jumps. -- https://bugs.ruby-lang.org/