Project

General

Profile

Actions

Bug #19341

closed

Write cache issue with class variables

Added by luke-gru (Luke Gruber) over 1 year ago. Updated over 1 year ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:111813]

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()

PR Here: https://github.com/ruby/ruby/pull/7124

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0