Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

class method · added in Ruby 4.0

Ractor.shareable_lambda

[T] () { (?) [self: nil] -> T } -> ^(?) [self: nil] -> T
[T, S] (self: S) { (?) [self: S] -> T } -> ^(?) [self: S] -> T
Ractor.shareable_lambda(self: nil){} → shareable lambda

Same as Ractor.shareable_proc, but returns a lambda Proc.

Ruby version changes

  1. 4.0