ruby-changes:50988
From: mame <ko1@a...>
Date: Fri, 20 Apr 2018 00:23:37 +0900 (JST)
Subject: [ruby-changes:50988] mame:r63197 (trunk): Adds "endless range" to NEWS
mame 2018-04-20 00:23:34 +0900 (Fri, 20 Apr 2018) New Revision: 63197 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63197 Log: Adds "endless range" to NEWS Modified files: trunk/NEWS Index: NEWS =================================================================== --- NEWS (revision 63196) +++ NEWS (revision 63197) @@ -22,6 +22,13 @@ with all sufficient information, see the https://github.com/ruby/ruby/blob/trunk/NEWS#L22 * 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 `(0..)`. + The following shows typical use cases. [Feature #12912] + + ary[1..] # identical to ary[1..-1] + (1..).each {|index| ... } # infinite loop from index 1 + ary.zip(1..) {|elem, index| ... } # ary.each.with_index(1) { } + === Core classes updates (outstanding ones only) * Array -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/