ruby-changes:64205
From: Koichi <ko1@a...>
Date: Wed, 16 Dec 2020 17:20:41 +0900 (JST)
Subject: [ruby-changes:64205] 0a52161872 (master): fix Ractor#receive by other ractors
https://git.ruby-lang.org/ruby.git/commit/?id=0a52161872 From 0a521618723e5e602c1288b4185b869e94332172 Mon Sep 17 00:00:00 2001 From: Koichi Sasada <ko1@a...> Date: Wed, 16 Dec 2020 17:18:07 +0900 Subject: fix Ractor#receive by other ractors Ractor#receive can be called by the another Ractors using send, so making this method completely same as `Ractor.receive` even if the ractor is specified by the receiver (OO term :p). diff --git a/ractor.rb b/ractor.rb index ca09aee..c3a8f27 100644 --- a/ractor.rb +++ b/ractor.rb @@ -94,10 +94,10 @@ class Ractor https://github.com/ruby/ruby/blob/trunk/ractor.rb#L94 alias recv receive end + # same as Ractor.receive private def receive __builtin_cexpr! %q{ - // TODO: check current actor - ractor_receive(ec, RACTOR_PTR(self)) + ractor_receive(ec, rb_ec_ractor_ptr(ec)) } end alias recv receive -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/