summaryrefslogtreecommitdiff
path: root/NEWS.md
diff options
context:
space:
mode:
authorVictor Shepelev <zverok.offline@gmail.com>2020-12-21 02:32:30 +0200
committerGitHub <noreply@github.com>2020-12-21 09:32:30 +0900
commit5253b9579a129f66a768dae24bd50a95bab02841 (patch)
tree289b20b4430e3368a9047a94f2e829679b013c02 /NEWS.md
parent6be61ab264c98c96e26b5d3398cf80b49197ba29 (diff)
Document usage of ArithmeticSequence in Array#slice, and add to NEWS (#3952)
Notes
Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
Diffstat (limited to 'NEWS.md')
-rw-r--r--NEWS.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/NEWS.md b/NEWS.md
index d88642b71c..447788b932 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -149,6 +149,14 @@ Outstanding ones only.
* Array#uniq
* Array#*
+ * Can be sliced with Enumerator::ArithmeticSequence
+
+ ```ruby
+ dirty_data = ['--', 'data1', '--', 'data2', '--', 'data3']
+ dirty_data[(1..).step(2)] # take each second element
+ # => ["data1", "data2", "data3"]
+ ```
+
* ConditionVariable
* ConditionVariable#wait may now invoke the `block`/`unblock` scheduler