Project

General

Profile

Actions

Feature #18919

open

Ractor: can't share #Method objects

Added by chucke (Tiago Cardoso) almost 2 years ago. Updated 12 months ago.

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

Description

The following is not shareable:

> meth = ::Kernel.method(:BigDecimal)
=> #<Method: Kernel.BigDecimal(*)>
<internal:ractor>:816:in `make_shareable': can not make shareable object for #<Method: Kernel.BigDecimal(*)> (Ractor::Error)

I understand that procs have the issue of accessing outer-scope variables, but does the same apply to methods converted to procs?

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0