mirror of
https://github.com/ruby/ruby.git
synced 2026-08-16 02:15:57 +08:00
An UnboundMethod does not refer to any mutable children, so it should be
shareable when frozen. The documentation for RUBY_TYPED_FROZEN_SHAREABLE_NO_REC
states:
Similar to RUBY_TYPED_FROZEN_SHAREABLE, but doesn't make shareable
reachable objects from this T_DATA object on the Ractor.make_shareable.
Therefore, Ractor.shareable?(BasicObject.instance_method(:equal?).freeze)
should return true since it doesn't refer to any shareable children. However,
it doesn't do that right now so frozen UnboundMethod cannot be shared
between Ractors.