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

ruby-changes:54149

From: marcandre <ko1@a...>
Date: Thu, 13 Dec 2018 04:51:55 +0900 (JST)
Subject: [ruby-changes:54149] marcandRe: r66370 (trunk): NEWS: Mention (1...) in addition to (1..) [DOC]

marcandre	2018-12-13 04:51:50 +0900 (Thu, 13 Dec 2018)

  New Revision: 66370

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

  Log:
    NEWS: Mention (1...) in addition to (1..) [DOC]

  Modified files:
    trunk/NEWS
Index: NEWS
===================================================================
--- NEWS	(revision 66369)
+++ NEWS	(revision 66370)
@@ -27,10 +27,11 @@ sufficient information, see the ChangeLo https://github.com/ruby/ruby/blob/trunk/NEWS#L27
 * constant names may start with a non-ASCII capital letter. [Feature #13770]
 
 * An endless range is introduced.  You can write a range that has no end,
-  like <code>(0..)</code>.  The following shows typical use cases.  [Feature #12912]
+  like <code>(0..)</code> (or similarly  <code>(0...)</code>).
+  The following shows typical use cases.  [Feature #12912]
 
     ary[1..]                            # identical to ary[1..-1]
-    (1..).each {|index| ... }           # infinite loop from index 1
+    (1...).each {|index| ... }          # infinite loop from index 1
     ary.zip(1..) {|elem, index| ... }   # ary.each.with_index(1) { }
 
 * Non-Symbol key in keyword arguments hash causes an exception.

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

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