Project

General

Profile

Bug #10028

nested rest keyword argument

Added by nobu (Nobuyoshi Nakada) over 5 years ago. Updated over 3 years ago.

Status:
Rejected
Priority:
Normal
Target version:
-
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 master - Feature #8895: Destructuring Assignment for HashOpenActions

History

Updated by nobu (Nobuyoshi Nakada) over 5 years ago

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

Updated by hsbt (Hiroshi SHIBATA) over 5 years ago

  • Status changed from Open to Assigned

Updated by nobu (Nobuyoshi Nakada) over 3 years ago

  • Description updated (diff)

Updated by matz (Yukihiro Matsumoto) over 3 years 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