Project

General

Profile

Actions

Bug #5989

closed

Keyword spash is syntax error when there are no explicit keyword arguments

Added by funny_falcon (Yura Sokolov) about 12 years ago. Updated about 12 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 2.0.0dev (2012-02-09 trunk 34505) [i686-linux]
Backport:
[ruby-core:42455]

Description

$ ruby -e 'def a(a:1, **h); p h; end; a(b: 1)'
{:b=>1}
$ ruby -e 'def a(**h); p h; end; a(b: 1)'
-e:1: syntax error, unexpected tPOW, expecting ')'
def a(**h); p h; end
        ^
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0