diff --git a/ractor.rb b/ractor.rb index 78980b2685..c825fbe0da 100644 --- a/ractor.rb +++ b/ractor.rb @@ -166,4 +166,11 @@ class Ractor close_incoming close_outgoing end + + # utility method + def self.shareable? obj + __builtin_cexpr! %q{ + rb_ractor_shareable_p(obj) ? Qtrue : Qfalse; + } + end end