Actions
Bug #5989
closedKeyword spash is syntax error when there are no explicit keyword arguments
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
^
Updated by ko1 (Koichi Sasada) almost 13 years ago
- Assignee set to mame (Yusuke Endoh)
Updated by nobu (Nobuyoshi Nakada) almost 13 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r34998.
Yura, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- parse.y (block_param, f_args): add rules for the case arguments
begin with kwrest. [ruby-core:42455][Bug #5989]
Updated by nobu (Nobuyoshi Nakada) almost 13 years ago
- Status changed from Closed to Open
- % Done changed from 100 to 20
Updated by nobu (Nobuyoshi Nakada) almost 13 years ago
- Status changed from Open to Closed
- % Done changed from 20 to 100
This issue was solved with changeset r34999.
Yura, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- compile.c (iseq_set_arguments): keyword rest arg without keyword args.
- node.c (dump_node): dump kw_rest_arg too.
- parse.y (block_param, f_arg): more kwrest patterns.
[ruby-core:42455][Bug #5989] - parse.y (new_args_gen): no extra kw_rest_arg if no keyword rest arg.
Actions
Like0
Like0Like0Like0Like0