digitalocean/droplet_kit

Use gem in Ruby 3 Ractor

msa7 opened this issue · 0 comments

msa7 commented

I am trying to use gem in Ruby 3 Ractor. I got few exceptions like this:

<internal:ractor>:694:in `take': thrown by remote Ractor. (Ractor::RemoteError)
.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/droplet_kit-3.15.0/lib/droplet_kit/client.rb:78:in `default_user_agent': can not access non-shareable objects in constant DropletKit::VERSION by non-main Ractor. (Ractor::IsolationError)

I think if you add .freeze on strings in the gem it will solve most of the issues