From: "herwin (Herwin W) via ruby-core" Date: 2025-12-26T06:16:43+00:00 Subject: [ruby-core:124367] [Ruby Bug#21808] Inconsistency in support of additional newlines with boolean logical operators on new line Issue #21808 has been reported by herwin (Herwin W). ---------------------------------------- Bug #21808: Inconsistency in support of additional newlines with boolean logical operators on new line https://bugs.ruby-lang.org/issues/21808 * Author: herwin (Herwin W) * Status: Open * ruby -v: ruby 4.0.0 (2025-12-25 revision 553f1675f3) +PRISM [x86_64-linux] * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- With this I mean the new Ruby 4 feature. With the old style, one could add additional lines in between: ```ruby if true && true puts 'match' end ``` With the new style, this results in a syntax error ```ruby if true && true puts 'match' end ``` If a comment is used instead of a new line, it still works ```ruby if true # blah && true puts 'match' end ``` This happens with both prism and parse.y I doubt anyone would want to write code like this (I don't think it improves the layout), but it's still a weird inconsistency that doesn't get mentioned. -- 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/lists/ruby-core.ml.ruby-lang.org/