From 87e78e6f8a7cf88bd3f8d3df2fbcfdb9c53a5294 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 22 Dec 2025 14:39:41 +0900 Subject: [PATCH] [DOC] Add multiline condition code example that was already possible To avoid the misconception that previously conditional code had to be written on a single line. --- NEWS.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index da8c494b4b..49747a703e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -12,7 +12,7 @@ Note that each entry is kept to a minimum, see links for details. * Logical binary operators (`||`, `&&`, `and` and `or`) at the beginning of a line continue the previous line, like fluent dot. - The following two code examples are equal: + The following code examples are equal: ```ruby if condition1 @@ -21,12 +21,21 @@ Note that each entry is kept to a minimum, see links for details. end ``` + Previously: + ```ruby if condition1 && condition2 ... end ``` + ```ruby + if condition1 && + condition2 + ... + end + ``` + [[Feature #20925]] ## Core classes updates