提交 0a3595f6 编写于 作者: A Aaron Patterson 提交者: GitHub

Merge pull request #26854 from headius/explicit_order_callback_args

Explicitly unpack the expanded args to avoid execution order diff.
......@@ -410,8 +410,8 @@ def expand(target, value, block)
# values.
def make_lambda
lambda do |target, value, &block|
c = expand(target, value, block)
c.shift.send(*c, &c.shift)
target, block, method, *arguments = expand(target, value, block)
target.send(method, *arguments, &block)
end
end
......@@ -419,8 +419,8 @@ def make_lambda
# values, but then return the boolean inverse of that result.
def inverted_lambda
lambda do |target, value, &block|
c = expand(target, value, block)
! c.shift.send(*c, &c.shift)
target, block, method, *arguments = expand(target, value, block)
! target.send(method, *arguments, &block)
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册