Actions
Bug #20078
closedStringIO cannot be moved between Ractors
Bug #20078:
StringIO cannot be moved between Ractors
Description
The following code will raise an unusual Ractor error.
require 'stringio'
r = Ractor.new { loop { Ractor.receive } }
Ractor.shareable?(StringIO.new) #=> false
r.send(StringIO.new) # passing it via copy works
r.send(StringIO.new, move: true) # <internal:ractor>:587:in `send': can not move StringIO object. (Ractor::Error)
I'm not 100% sure but I believe that this probably not the intended behavior considering
- The error raised is a generic
Ractor::Errorrather than something specific like Ractor::MovedError or Ractor::IsolationError - It can be copied
- No documentation exists for this error
- I have yet to seen this happen on any other class instance
- Typo (can not -> cannot)
Actions