Issue #6727 has been updated by trans (Thomas Sawyer).


Rather then haphazard method additions in this area I still think a better approach would be a common mixin.

http://rdoc.info/github/rubyworks/facets/master/Indexable

It's like Enumerable, but for a different set of functionality. Depending only on a minimal set of methods to facilitate the rest creates a more robust and flexible system. Call it "Occam's Principle of Interfaces" (though the principle probably already has another name?)

----------------------------------------
Feature #6727: Add Array#rest (with implementation)
https://bugs.ruby-lang.org/issues/6727#change-28011

Author: duckinator (Nick Markwell)
Status: Assigned
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
Category: 
Target version: 


=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: ((<URL:https://github.com/duckinator/ruby/compare/feature/array_rest>))

Patch: ((<URL:https://github.com/duckinator/ruby/compare/feature/array_rest.patch>))

Diff: ((<URL:https://github.com/duckinator/ruby/compare/feature/array_rest.diff>))
=end


-- 
http://bugs.ruby-lang.org/