Project

General

Profile

Actions

Feature #17513

open

Methods of shareable objects and UnboundMethods should be shareable

Added by marcandre (Marc-Andre Lafortune) almost 4 years ago. Updated 8 months ago.

Status:
Assigned
Target version:
-
[ruby-core:101945]

Description

class Foo
  def foo
  end
end

f = Foo.new.freeze
Ractor.shareable?(f) # => true
Ractor.make_shareable(f.method(:foo).to_proc) # => Proc, ok
Ractor.make_shareable(f.method(:foo)) # => Ractor::Error, expected Method
Ractor.make_shareable(Foo.instance_method(:foo)) # => Ractor::Error, expected UnboundMethod
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0