Project

General

Profile

Bug #5989

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

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

Status:
Closed
Priority:
Normal
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
        ^

Also available in: Atom PDF