Project

General

Profile

Actions

Bug #22264

closed

Warning missing from parse.y hash literals

Bug #22264: Warning missing from parse.y hash literals

Added by kddnewton (Kevin Newton) 2 days ago. Updated 1 day ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:126499]

Description

$ ruby --parser=parse.y -cve '{**{}, a: 1, **{a: 2}}'
ruby 4.1.0dev (2026-04-21T02:07:14Z aot be86d5704f) [arm64-darwin23]
Syntax OK
$ ruby --parser=parse.y -cve '{a: 1, **{a: 2}}'
ruby 4.1.0dev (2026-04-21T02:07:14Z aot be86d5704f) [arm64-darwin23]
-e:1: warning: key :a is duplicated and overwritten on line 1
Syntax OK

Actions

Also available in: PDF Atom