Ruby 4.1 リファレンスマニュアル

class Ractor::MovedError

[edit]

要約

他の Ractor に移動(move)されたオブジェクトにアクセスした場合に発生します。

Ractor#sendmove: true を指定してオブジェクトを送ると、送った側ではそのオブジェクトが Ractor::MovedObject に置き換わり、以後アクセスできなくなります。

s = +"hello"
r = Ractor.new { Ractor.receive }
r.send(s, move: true)
s.upcase # ~> Ractor::MovedError

[SEE_ALSO] Ractor, Ractor::MovedObject, Ractor#send

目次

継承しているメソッド

Exceptionから継承している特異メソッド
Exceptionから継承しているメソッド