Project

General

Profile

Actions

Bug #19372

open

Proc objects are not traversed for shareable check during Ractor.make_shareable(prok)

Added by luke-gru (Luke Gruber) almost 2 years ago. Updated almost 2 years ago.

Status:
Assigned
Target version:
-
[ruby-core:111992]

Description

class Proc
  attr_accessor :obj1
  def initialize
    @obj1 = Object.new
  end
end

p = true.instance_eval { Proc.new { puts "hi" } }
Ractor.make_shareable(p)
p "Obj1 frozen?", Ractor.shareable?(p.obj1)
P = p

r = Ractor.new do
  pp = P
  p pp.obj1 # gives error in debug builds (rb_ractor_confirm_belonging rb_bug() call)
end
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0