Project

General

Profile

Actions

Bug #19413

open

Can't move object when 2 ivars refer to same object

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

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:112217]

Description

class A
  def initialize
    @a = Object.new
    @b = @a
  end
end

r = Ractor.new do |err|
  obj = receive
  p obj
end
r.send(A.new, move: true) # Allocator undefined for Ractor::MovedObject
r.take

To fix it we could have a hash of old to new objects during traversal/replacement and use the same new object over again if necessary.

No data to display

Actions

Also available in: Atom PDF

Like0