Project

General

Profile

Actions

Bug #19409

closed

Object's shape is reset after a ractor move

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


Description

I believe an object should have the same shape after being moved from 1 ractor to another.

class Obj
  attr_accessor :a, :b, :c, :d
  def initialize
    @a = 1
    @b = 2
    @c = 3
  end
end
r = Ractor.new do
  obj = receive
  #p RubyVM::Shape.of(obj)
  obj.d = 4
  p obj.a, obj.b, obj.c, obj.d # gets wrong values due to object shape id being reset on object
end
obj = Obj.new
#p RubyVM::Shape.of(obj)
r.send(obj, move: true)
r.take

Updated by hsbt (Hiroshi SHIBATA) about 1 year ago

  • Status changed from Open to Assigned
  • Assignee set to ko1 (Koichi Sasada)
Actions #3

Updated by jeremyevans0 (Jeremy Evans) 4 months ago

  • Status changed from Assigned to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0