From: "marcandre (Marc-Andre Lafortune)" Date: 2013-11-11T00:27:09+09:00 Subject: [ruby-core:58249] [ruby-trunk - Feature #6727] Add Array#rest (with implementation) Issue #6727 has been updated by marcandre (Marc-Andre Lafortune). Hi, duckinator (Nick Markwell) wrote: > Regarding examples of it used in practice: > > Just from code I happened to already have on my system, there is 501 instances of [1..-1] in Ruby code. > > https://gist.github.com/3967189 > > Out of what I have on my system it is, surprisingly, used mostly in relation to Ruby interpreters: 217 instances in MRI's git repo, 162 instances in Rubinius' git repo, 95 instances in JRuby's git repo. > > Aside from that, on my system the usages are mostly small: 4 uses by Bundler, 11 instances by what I believe are WebKit's build scripts, 4 times by cinch, and 8 times in various other things. I believe that the vast majority of these examples are for strings, not arrays. ---------------------------------------- Feature #6727: Add Array#rest (with implementation) https://bugs.ruby-lang.org/issues/6727#change-42840 Author: duckinator (Nick Markwell) Status: Assigned Priority: Normal Assignee: matz (Yukihiro Matsumoto) Category: core Target version: next minor =begin I run into many instances where I end up using (({arr[1..-1]})), so I decided to add (({arr.rest})) to make that a bit less hideous. Branch on github: (()) Patch: (()) Diff: (()) =end -- http://bugs.ruby-lang.org/