ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: "Hanmac (Hans Mackowiak)" <hanmac@gmx.de>
To: ruby-core@ruby-lang.org
Subject: [ruby-core:58256] [ruby-trunk - Feature #6727] Add Array#rest (with implementation)
Date: Mon, 11 Nov 2013 01:47:28 +0900	[thread overview]
Message-ID: <redmine.journal-42847.20131111014727@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-6727.20120713132504@ruby-lang.org


Issue #6727 has been updated by Hanmac (Hans Mackowiak).


i think in most cases we want something like ary[1..-1].each  but wouldnt it be better if we have an each method like 

each_only(1..-1) {}

that does that for us without making an new array?
----------------------------------------
Feature #6727: Add Array#rest (with implementation)
https://bugs.ruby-lang.org/issues/6727#change-42847

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: ((<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/

  parent reply	other threads:[~2013-11-10 17:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-13  4:25 [ruby-core:46377] [ruby-trunk - Feature #6727][Open] Add Array#rest (with implementation) duckinator (Nick Markwell)
2012-07-13  4:55 ` [ruby-core:46378] [ruby-trunk - Feature #6727][Rejected] " marcandre (Marc-Andre Lafortune)
2012-07-13  5:22 ` [ruby-core:46380] [ruby-trunk - Feature #6727] " duckinator (Nick Markwell)
2012-07-13  5:33 ` [ruby-core:46381] " duckinator (Nick Markwell)
2012-07-13  5:46 ` [ruby-core:46382] " programble (Curtis McEnroe)
2012-07-13  6:01 ` [ruby-core:46384] " tsion (Scott Olson)
2012-07-13 11:30 ` [ruby-core:46388] " Eregon (Benoit Daloze)
2012-07-13 13:44 ` [ruby-core:46391] [ruby-trunk - Feature #6727][Assigned] " naruse (Yui NARUSE)
2012-07-13 14:31 ` [ruby-core:46392] [ruby-trunk - Feature #6727] " marcandre (Marc-Andre Lafortune)
2012-07-13 15:00 ` [ruby-core:46395] " trans (Thomas Sawyer)
2012-07-13 15:34 ` [ruby-core:46396] " duckinator (Nick Markwell)
2012-10-27 15:14 ` [ruby-core:48487] " yhara (Yutaka HARA)
2012-10-28  2:25 ` [ruby-core:48511] " duckinator (Nick Markwell)
2012-10-28 11:25 ` [ruby-core:48515] " Eregon (Benoit Daloze)
2013-11-09 20:12 ` [ruby-core:58239] " baweaver (Brandon Weaver)
2013-11-09 20:38   ` [ruby-core:58240] " Fuad Saud
2013-11-10 15:27 ` [ruby-core:58249] " marcandre (Marc-Andre Lafortune)
2013-11-11  7:19   ` [ruby-core:58267] " "Martin J. Dürst"
2013-11-10 16:47 ` Hanmac (Hans Mackowiak) [this message]
2013-11-11  7:21   ` [ruby-core:58268] " "Martin J. Dürst"
2013-11-11  9:18 ` [ruby-core:58273] " alexeymuranov (Alexey Muranov)
2013-11-11  9:27 ` [ruby-core:58274] " Hanmac (Hans Mackowiak)
2013-11-11 17:29 ` [ruby-core:58283] " fuadksd (Fuad Saud)
2013-11-12  1:04   ` [ruby-core:58285] " "Martin J. Dürst"
2019-08-14  8:51 ` [ruby-core:94346] [Ruby master Feature#6727] " mame

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-42847.20131111014727@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).