mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 06:56:13 +02:00
Revert "Fix evaluation order issue in f(**h, &h.delete(key))"
This reverts commit 07d3bf4832
.
No failures in the pull request CI, but there are now allocation
test failures.
This commit is contained in:
parent
07d3bf4832
commit
9c12c39ed1
3 changed files with 25 additions and 84 deletions
|
@ -374,21 +374,6 @@ class TestCall < Test::Unit::TestCase
|
|||
assert_equal({splat_modified: false}, b)
|
||||
end
|
||||
|
||||
def test_kwsplat_block_eval_order
|
||||
def self.t(**kw, &b) [kw, b] end
|
||||
|
||||
pr = ->{}
|
||||
h = {a: pr}
|
||||
a = []
|
||||
|
||||
ary = t(**h, &h.delete(:a))
|
||||
assert_equal([{a: pr}, pr], ary)
|
||||
|
||||
h = {a: pr}
|
||||
ary = t(*a, **h, &h.delete(:a))
|
||||
assert_equal([{a: pr}, pr], ary)
|
||||
end
|
||||
|
||||
def test_kwsplat_block_order
|
||||
o = Object.new
|
||||
ary = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue