[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.
This commit is contained in:
Nobuyoshi Nakada 2025-12-22 14:39:41 +09:00
parent cfb324e9d1
commit 87e78e6f8a
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
Notes: git 2025-12-22 05:51:34 +00:00

11
NEWS.md
View File

@ -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