ruby-changes:55603
From: Yusuke <ko1@a...>
Date: Mon, 29 Apr 2019 01:18:05 +0900 (JST)
Subject: [ruby-changes:55603] Yusuke Endoh:50cbb21ba5 (trunk): Add "Integer#[] with range" to NEWS
https://git.ruby-lang.org/ruby.git/commit/?id=50cbb21ba5 From 50cbb21ba533f67e29d7da0975ba186f9e3da93f Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Mon, 29 Apr 2019 01:17:27 +0900 Subject: Add "Integer#[] with range" to NEWS diff --git a/NEWS b/NEWS index b4e62bf..9376af0 100644 --- a/NEWS +++ b/NEWS @@ -31,7 +31,7 @@ sufficient information, see the ChangeLog file or Redmine https://github.com/ruby/ruby/blob/trunk/NEWS#L31 experimental feature. [Feature #4475] * A beginless range is experimentally introduced. It might not be as useful - as an endless range, but would be good for DSL purpose. + as an endless range, but would be good for DSL purpose. [Feature #14799] ary[..3] # identical to ary[0..3] where(sales: ..100) @@ -42,6 +42,13 @@ sufficient information, see the ChangeLog file or Redmine https://github.com/ruby/ruby/blob/trunk/NEWS#L42 * Setting <code>$,</code> to non-nil value is warned now. Use of it in Array#join is warned too. +* <code>Integer#[]</code> now supports range operation. [Feature #8842] + + 0b01001101[2, 4] #=> 0b0011 + 0b01001100[2..5] #=> 0b0011 + 0b01001100[2...6] #=> 0b0011 + ^^^^ + === Core classes updates (outstanding ones only) Enumerable:: -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/