Actions
Bug #20927
closed`{ **{ } }` behaves differently when `shareable_constant_value: experimental_everything`
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.3.4 (2024-07-16 revision 425e468d25) [arm64-darwin23]
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.
Updated by tenderlovemaking (Aaron Patterson) about 2 months ago
- Related to Bug #20926: shareable_constant_value: experimental_everything crashes with parse.y added
Updated by tenderlovemaking (Aaron Patterson) about 2 months ago
- Related to Bug #20916: Prism compiler should support ** in Ractor constant added
Updated by tompng (tomoya ishida) about 1 month ago
Pull request: https://github.com/ruby/ruby/pull/12338
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
Like0
Like0Like0Like0Like0