[#97678] [Ruby master Feature#16752] :private param for const_set — bughitgithub@...
Issue #16752 has been reported by bughit (bug hit).
5 messages
2020/04/02
[ruby-core:97928] [Ruby master Bug#11143] it should always be possible to return from an if
From:
ruby-core@...
Date:
2020-04-16 21:30:49 UTC
List:
ruby-core #97928
Issue #11143 has been updated by marcandre (Marc-Andre Lafortune). Just got hit by this. Is this difficult to backport to supported versions? ---------------------------------------- Bug #11143: it should always be possible to return from an if https://bugs.ruby-lang.org/issues/11143#change-85150 * Author: bughit (bug hit) * Status: Closed * Priority: Normal * 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/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>