diff options
author | Jeremy Evans <code@jeremyevans.net> | 2022-03-11 13:49:36 -0800 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2022-04-05 11:42:02 +0200 |
commit | 752c3dad989bb66e4be61911a82fed992067bdc3 (patch) | |
tree | 7e45be9773104da5d4cfcebaa53052e4e631dd80 /tool/bisect.sh | |
parent | 5e7ebc7e6e626db01766294edbe41019b98b2e84 (diff) |
Unflag a splatted flagged hash if the method doesn't use ruby2_keywords
For a method such as:
def foo(*callee_args) end
If this method is called with a flagged hash (created by a method
flagged with ruby2_keywords), this previously passed the hash
through without modification. With this change, it acts as if the
last hash was passed as keywords, so a call to:
foo(*caller_args)
where the last element of caller_args is a flagged hash, will be
treated as:
foo(*caller_args[0...-1], **caller_args[-1])
As a result, inside foo, callee_args[-1] is an unflagged duplicate
of caller_args[-1] (all other elements of callee_args match
caller_args).
Fixes [Bug #18625]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5684
Diffstat (limited to 'tool/bisect.sh')
0 files changed, 0 insertions, 0 deletions