Project

General

Profile

Actions

Bug #8457

closed

Function arguments: Is this intended?

Added by Anonymous almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Target version:
-
ruby -v:
2.0.0
[ruby-core:55185]

Description

a = [1, 2, x: 3]
a.tap { |*p, q| a.clear.concat p } #=> [1, 2]

but

a = [1, 2, x: 3]
a.tap { |*p, **q| a.clear.concat p } #=> [[...]]

and also

a = [1, 2]
a.tap { |*p| a.clear.concat p } #=> [[...]]

???


Related issues 1 (0 open1 closed)

Related to Backport200 - Backport #8463: Proc auto-splat bug with named argumentsClosednagachika (Tomoyuki Chikanaga)05/30/2013Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0