In order to be Ractor-compliant, tmpdir must avoid relying on class variables. In non-main Ractors, where @@systmpdir cannot be accessed, a default value can be used instead.
Additionally, instance of the class Random cannot be made shareable, so RANDOM can be an instance of Object instead. This means that the “next” method would use Kernel#rand instead of Random#rand, but the method should still work.
In order to be Ractor-compliant, tmpdir must avoid relying on class variables. In non-main Ractors, where @@systmpdir cannot be accessed, a default value can be used instead.
Additionally, instance of the class Random cannot be made shareable, so RANDOM can be an instance of Object instead. This means that the “next” method would use Kernel#rand instead of Random#rand, but the method should still work.