< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(スレッド移動)
N :次の記事(スレッド移動)
|<:前のスレッド
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Issue #16504 has been updated by mame (Yusuke Endoh).
Assignee set to jeremyevans0 (Jeremy Evans)
jeremyevans0 (Jeremy Evans) wrote in #note-13:
> mame (Yusuke Endoh) wrote in #note-12:
> > jeremyevans0 (Jeremy Evans) wrote in #note-9:
> > > I've added a pull request that fixes this issue: https://github.com/ruby/ruby/pull/3157
> >
> > Wow https://bugs.ruby-lang.org/issues/16504#note-1
>
> Sorry, I completely missed that you also had a fix for this (basically the same other than the test added).
Don't worry. It is good to know that two persons reached the same solution independently. Your patch is better because it includes tests, so could you commit your patch?
----------------------------------------
Bug #16504: `foo(*args, &args.pop)` should pass all elements of args
https://bugs.ruby-lang.org/issues/16504#change-86218
* Author: mame (Yusuke Endoh)
* Status: Open
* Priority: Normal
* Assignee: jeremyevans0 (Jeremy Evans)
* 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
```
def foo(*args)
p args
end
# 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/
Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>