summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2025-12-22 14:39:41 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2025-12-22 14:39:41 +0900
commit87e78e6f8a7cf88bd3f8d3df2fbcfdb9c53a5294 (patch)
treedfb3ffda0a592fcd8c58456cf51c636d7808bb63
parentcfb324e9d12d0d40a8f9052b97a860737b78224f (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.md11
1 files changed, 10 insertions, 1 deletions
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