Project

General

Profile

Bug #10028

nested rest keyword argument

Added by nobu (Nobuyoshi Nakada) over 3 years ago. Updated over 1 year 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 trunk - Feature #8895: Destructuring Assignment for HashOpen

History

#1 [ruby-dev:48396] Updated by nobu (Nobuyoshi Nakada) over 3 years ago

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

#2 [ruby-dev:48464] Updated by hsbt (Hiroshi SHIBATA) about 3 years ago

  • Status changed from Open to Assigned

#3 [ruby-dev:49603] Updated by nobu (Nobuyoshi Nakada) over 1 year ago

  • Description updated (diff)

#4 [ruby-dev:49604] Updated by matz (Yukihiro Matsumoto) over 1 year 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