[前][次][番号順一覧][スレッド一覧]

ruby-changes:52651

From: mrkn <ko1@a...>
Date: Thu, 27 Sep 2018 18:29:59 +0900 (JST)
Subject: [ruby-changes:52651] mrkn:r64863 (trunk): NEWS: Add ArithmeticSequence related things

mrkn	2018-09-27 18:29:51 +0900 (Thu, 27 Sep 2018)

  New Revision: 64863

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64863

  Log:
    NEWS: Add ArithmeticSequence related things
    
    [ci skip]

  Modified files:
    trunk/NEWS
Index: NEWS
===================================================================
--- NEWS	(revision 64862)
+++ NEWS	(revision 64863)
@@ -89,6 +89,13 @@ sufficient information, see the ChangeLo https://github.com/ruby/ruby/blob/trunk/NEWS#L89
         * `Enumerable#filter` is a new alias for `Enumerable#select`.
           [Feature #13784]
 
+* `Enumerator::ArithmeticSequence`
+
+    * This is a new class to represent a generator of an arithmetic sequence,
+      that is a number sequence defined by a common difference. It can be used
+      for representing what is similar to Python's slice. You can get an
+      instance of this class from `Numeric#step` and `Range#step`.
+
 * `Enumerator::Lazy`
 
     * Aliased methods:
@@ -181,6 +188,14 @@ sufficient information, see the ChangeLo https://github.com/ruby/ruby/blob/trunk/NEWS#L188
         * `NameError#initialize` accepts `:receiver` option to set receiver
           in Ruby code.  [Feature #14313]
 
+* `Numeric`
+
+    * Incompatible changes:
+
+        * `Numeric#step` now returns an instance of
+          `Enumerator::ArithmeticSequence` class rather than one of
+          `Enumerator` class.
+
 * `NoMethodError`
 
     * New options:
@@ -207,6 +222,9 @@ sufficient information, see the ChangeLo https://github.com/ruby/ruby/blob/trunk/NEWS#L222
         * `Range#===` now uses `#cover?` instead of `#include?` method.
           [Feature #14575]
 	* `Range#cover?` now accepts Range object. [Feature #14473]
+        * `Range#step` now returns an instance of
+          `Enumerator::ArithmeticSequence` class rather than one of
+          `Enumerator` class.
 
 * `RubyVM::AST`
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]