Actions
Bug #19341
closedWrite cache issue with class variables
Description
class SetCvar
def self.set(val)
@@a = val # inline cache
end
end
def test_set_cvar_on_frozen_object
SetCvar.set(1) # fill write cache
SetCvar.freeze
SetCvar.set(2) # hit write cache, but should check frozen status
end
test_set_cvar_on_frozen_object()
Updated by peterzhu2118 (Peter Zhu) almost 2 years ago
- Backport changed from 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN to 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONTNEED, 3.2: REQUIRED
Updated by luke-gru (Luke Gruber) almost 2 years ago
- Status changed from Open to Closed
Applied in changeset git|f66804e6f78ed4cf81896d2256743a820b05939a.
don't allow setting class variable on module that's frozen [Bug #19341]
Updated by naruse (Yui NARUSE) almost 2 years ago
This breaks CI on ruby_3_2 branch https://github.com/nurse/ruby/commit/ec9a6ae3f6961b0ece1a6fc67ea26033ee91498e
Actions
Like0
Like0Like0Like0