diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-12-22 14:39:41 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-12-22 14:39:41 +0900 |
| commit | 87e78e6f8a7cf88bd3f8d3df2fbcfdb9c53a5294 (patch) | |
| tree | dfb3ffda0a592fcd8c58456cf51c636d7808bb63 | |
| parent | cfb324e9d12d0d40a8f9052b97a860737b78224f (diff) | |
[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.
| -rw-r--r-- | NEWS.md | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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 |
