summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2024-12-16 00:31:49 +0100
committerJean Boussier <jean.boussier@gmail.com>2024-12-16 08:37:55 +0100
commit5d97c14fec90b96f82d13299f578d16ee9996b3f (patch)
tree4e16dfdf08f3bb0c09f8d4a30a431cb6ecadb5d6
parent923f831804b8bc26bf0412b932791d9090ff8ac4 (diff)
FIx Ractor.main? to return `true` not `0`
[Bug #20954]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12352
-rw-r--r--ractor.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ractor.rb b/ractor.rb
index 3119682dd1..39dc8c9dc1 100644
--- a/ractor.rb
+++ b/ractor.rb
@@ -884,7 +884,7 @@ class Ractor
# return true if the current ractor is main ractor
def self.main?
__builtin_cexpr! %q{
- GET_VM()->ractor.main_ractor == rb_ec_ractor_ptr(ec)
+ RBOOL(GET_VM()->ractor.main_ractor == rb_ec_ractor_ptr(ec))
}
end