Project

General

Profile

Actions

Bug #16139

closed

setinstancevariable on MJIT may not check frozen flag

Added by k0kubun (Takashi Kokubun) over 4 years ago. Updated about 4 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.7.0dev (2019-09-03T12:12:31Z master beaabd2308) [x86_64-linux]
[ruby-core:94767]

Description

class A
  def a
    @a = 1
  end
end

a = A.new
a.a
a.a
a.a
a.freeze
a.a

without JIT

$ ruby --disable-gems a.rb
Traceback (most recent call last):
        1: from a.rb:12:in `<main>'
a.rb:3:in `a': can't modify frozen A: #<A:0x00005601af0b0430 @a=1> (FrozenError)

with JIT

$ ruby --disable-gems --jit-min-calls=3 --jit-wait a.rb

(no error)

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0