Project

General

Profile

Actions

Bug #21016

closed

What should massign with `shareable_constant_value: experimental_everything` freeze?

Added by nobu (Nobuyoshi Nakada) 3 months ago. Updated 16 days ago.

Status:
Closed
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?


Related issues 1 (0 open1 closed)

Is duplicate of Ruby - Bug #20340: Ractor comments not applying to constant targetsClosedActions
Actions #1

Updated by nobu (Nobuyoshi Nakada) 3 months ago

  • Description updated (diff)

Updated by kddnewton (Kevin Newton) 3 months 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.

Actions #3

Updated by nobu (Nobuyoshi Nakada) 18 days ago

  • Is duplicate of Bug #20340: Ractor comments not applying to constant targets added

Updated by matz (Yukihiro Matsumoto) 16 days ago

In my opinion, only constant assignment should make assignee shareable.

Matz.

Actions #5

Updated by kddnewton (Kevin Newton) 16 days ago

  • Status changed from Open to Closed

Based on https://bugs.ruby-lang.org/issues/21016#note-4, I think this is the expected behavior.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0