diff options
author | Jeremy Evans <code@jeremyevans.net> | 2019-09-18 12:08:14 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2019-09-20 07:45:11 -0700 |
commit | 27b67468724dc48ed8305d8cb33484a4af98fc05 (patch) | |
tree | ed3a664dc2f2a7f729894a3d253171ce19b7f25b /enc/windows_31j.c | |
parent | e81a3e6df54842b5a836dad7055a4295cf4155bc (diff) | |
download | ruby-27b67468724dc48ed8305d8cb33484a4af98fc05.tar.gz |
Make passing empty keywords to dig pass empty keywords to next dig method
If defined in Ruby, dig would be defined as def dig(arg, *rest) end,
it would not use keywords. If the last dig argument was an empty
hash, it could be treated as keyword arguments by the next dig
method. Allow dig to pass along the empty keyword flag if called
with an empty keyword, to suppress the previous behavior and force
treating the hash as a positional argument and not keywords.
Also handle the case where dig calls method_missing, passing the
empty keyword flag to that as well.
This requires adding rb_check_funcall_with_hook_kw functions, so
that dig can specify how arguments are treated. It also adds
kw_splat arguments to a couple static functions.
Diffstat (limited to 'enc/windows_31j.c')
0 files changed, 0 insertions, 0 deletions