Skip to content

Commit 87e78e6

Browse files
committed
[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.
1 parent cfb324e commit 87e78e6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

NEWS.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Note that each entry is kept to a minimum, see links for details.
1212

1313
* Logical binary operators (`||`, `&&`, `and` and `or`) at the
1414
beginning of a line continue the previous line, like fluent dot.
15-
The following two code examples are equal:
15+
The following code examples are equal:
1616

1717
```ruby
1818
if condition1
@@ -21,12 +21,21 @@ Note that each entry is kept to a minimum, see links for details.
2121
end
2222
```
2323

24+
Previously:
25+
2426
```ruby
2527
if condition1 && condition2
2628
...
2729
end
2830
```
2931

32+
```ruby
33+
if condition1 &&
34+
condition2
35+
...
36+
end
37+
```
38+
3039
[[Feature #20925]]
3140

3241
## Core classes updates

0 commit comments

Comments
 (0)