Project

General

Profile

Bug #10028

nested rest keyword argument

Added by Nobuyoshi Nakada almost 2 years ago. Updated about 2 months ago.

Status:
Rejected
Priority:
Normal
ruby -v:
trunk
[ruby-dev:48395]

Description

ネストしたrest argumentは通りますが

def f((*a)) end

ネストしたrest keyword argumentはsyntax errorになります。

def f((**a)) end #=> syntax error, unexpected **arg

Related issues

Related to Ruby trunk - Feature #8895: Destructuring Assignment for Hash Open

History

#1 [ruby-dev:48396] Updated by Nobuyoshi Nakada almost 2 years ago

  • Related to Feature #8895: Destructuring Assignment for Hash added

#2 [ruby-dev:48464] Updated by Hiroshi SHIBATA almost 2 years ago

  • Status changed from Open to Assigned

#3 [ruby-dev:49603] Updated by Nobuyoshi Nakada about 2 months ago

  • Description updated (diff)

#4 [ruby-dev:49604] Updated by Yukihiro Matsumoto about 2 months ago

  • Status changed from Assigned to Rejected

This is intentional. Nested arguments are assignees of multiple assignments in reality. And multiple assignments do not support rest keyword argument (yet). When we introduce something like #8895, it should be supported.

Matz.

Also available in: Atom PDF