Project

General

Profile

Actions

Bug #20927

closed

`{ **{ } }` behaves differently when `shareable_constant_value: experimental_everything`

Added by tenderlovemaking (Aaron Patterson) about 2 months ago. Updated about 1 month ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.3.4 (2024-07-16 revision 425e468d25) [arm64-darwin23]
[ruby-core:120082]

Description

These two programs produce different results

# shareable_constant_value: experimental_everything

C = { **{ } }

p C
C = { **{ } }

p C

The first one prints this:

$ ruby test.rb
{nil=>{}}

The second one prints this:

$ ruby test.rb
{}

I think they should print the same thing.


Related issues 2 (0 open2 closed)

Related to Ruby master - Bug #20926: shareable_constant_value: experimental_everything crashes with parse.yClosedActions
Related to Ruby master - Bug #20916: Prism compiler should support ** in Ractor constantClosedprismActions
Actions #1

Updated by tenderlovemaking (Aaron Patterson) about 2 months ago

  • Related to Bug #20926: shareable_constant_value: experimental_everything crashes with parse.y added
Actions #2

Updated by tenderlovemaking (Aaron Patterson) about 2 months ago

  • Related to Bug #20916: Prism compiler should support ** in Ractor constant added
Actions #4

Updated by tompng (tomoya ishida) about 1 month ago

  • Status changed from Open to Closed

Applied in changeset git|e06b3b5ad1f6453ebebc5d9a54d82e3bb2ab116f.


[Bug #20927] Fix compile_shareable_literal_constant for hash with keyword splat

Compilation of NODE_HASH in compile_shareable_literal_constant does not support hash that contains keyword splat.
If there is a keyword splat, fallback to default case.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0