Project

General

Profile

Actions

Bug #10028

closed

nested rest keyword argument

Added by nobu (Nobuyoshi Nakada) over 10 years ago. Updated over 8 years ago.

Status:
Rejected
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 1 (0 open1 closed)

Related to Ruby master - Feature #8895: Destructuring Assignment for HashClosedActions

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

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

Updated by hsbt (Hiroshi SHIBATA) over 10 years ago

  • Status changed from Open to Assigned

Updated by nobu (Nobuyoshi Nakada) over 8 years ago

  • Description updated (diff)

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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0