ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: mame@ruby-lang.org
To: ruby-core@ruby-lang.org
Subject: [ruby-core:96799] [Ruby master Bug#16504] `foo(*args, &args.pop)` should pass all elements of args
Date: Sun, 12 Jan 2020 00:52:21 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-83791.20200112005220.c2dede3db800e101@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-16504.20200112004751@ruby-lang.org

Issue #16504 has been updated by mame (Yusuke Endoh).


https://github.com/ruby/ruby/pull/2833

----------------------------------------
Bug #16504: `foo(*args, &args.pop)` should pass all elements of args
https://bugs.ruby-lang.org/issues/16504#change-83791

* Author: mame (Yusuke Endoh)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
https://bugs.ruby-lang.org/issues/16500?next_issue_id=16499&prev_issue_id=16501#note-7

```
# in 2.7
args = [1, 2, -> {}]; foo(   *args, &args.pop) #=> passes [1, 2] (bug; [1, 2, ->{}] is expected)
args = [1, 2, -> {}]; foo(0, *args, &args.pop) #=> passes [0, 1, 2, ->{}] (good)
```



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

  parent reply	other threads:[~2020-01-12  0:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-16504.20200112004751@ruby-lang.org>
2020-01-12  0:47 ` [ruby-core:96798] [Ruby master Bug#16504] `foo(*args, &args.pop)` should pass all elements of args mame
2020-01-12  0:52 ` mame [this message]
2020-01-12 16:37 ` [ruby-core:96806] " eregontp
2020-01-12 23:44 ` [ruby-core:96820] " mame
2020-01-13  0:01 ` [ruby-core:96821] " mame
2020-01-13 13:21 ` [ruby-core:96825] " eregontp
2020-01-13 14:27 ` [ruby-core:96826] " ruby-core

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-83791.20200112005220.c2dede3db800e101@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).