Project

General

Profile

ActionsLike0

Bug #21016

open

What should massign with `shareable_constant_value: experimental_everything` freeze?

Added by nobu (Nobuyoshi Nakada) 20 days ago. Updated 20 days ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:120548]

Description

Derived from #21011.

Even with prism:

# shareable_constant_value: experimental_everything
A, = ""
p A.frozen? #=> false

This A should be frozen?

Furthermore:

# shareable_constant_value: experimental_everything
A, a = "A", "a"
p A.frozen? #=> false
p a.frozen? #=> false

Should only A be frozen but not a?
Or massign including a constant can freeze everything?

Like0Actions #1

Updated by nobu (Nobuyoshi Nakada) 20 days ago

  • Description updated (diff)

Updated by kddnewton (Kevin Newton) 20 days ago

Yeah we found this when we were building prism (https://bugs.ruby-lang.org/issues/20340). I don't know what the expected behavior here is.

ActionsLike0

Also available in: Atom PDF