From 0a521618723e5e602c1288b4185b869e94332172 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Wed, 16 Dec 2020 17:18:07 +0900 Subject: [PATCH] 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). --- ractor.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ractor.rb b/ractor.rb index ca09aee7be..c3a8f27532 100644 --- a/ractor.rb +++ b/ractor.rb @@ -94,10 +94,10 @@ class Ractor 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