Actions
Feature #6353
closedcaller-side **
Description
Relating to keyword argument (#5474), there are some requests for
caller-side **. [ruby-core:40518]
def foo(k1: 1, k2: 2)
p [k1, k2]
end
h = {k2: "bar"}
foo(k1: "foo", **h) # <== here
#=> ["foo", "bar"]
Marc-Andre explained the use case [ruby-core:41772], and matz agreed with
this feature. [ruby-core:41818]
However, it conflicts with power expression when parens are omitted:
foo **h # foo(h)? or foo.send("", h)?
Which should it be interpreted?
Anyway, I have no idea to avoid yacc conflict.
Nobu, could you please try to implement it?
--
Yusuke Endoh mame@tsg.ne.jp
Actions
Like0
Like0Like0Like0