summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bootstraptest/test_ractor.rb3
-rw-r--r--ractor.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb
index 96c0f276a1..f92b604d2a 100644
--- a/bootstraptest/test_ractor.rb
+++ b/bootstraptest/test_ractor.rb
@@ -1494,8 +1494,9 @@ assert_equal "#{n}#{n}", %Q{
# NameError
assert_equal "ok", %q{
+ obj = "".freeze # NameError refers the receiver indirectly
begin
- bar
+ obj.bar
rescue => err
end
begin
diff --git a/ractor.c b/ractor.c
index c18219e683..8c367e17cb 100644
--- a/ractor.c
+++ b/ractor.c
@@ -3127,7 +3127,7 @@ obj_refer_only_shareables_p_i(VALUE obj, void *ptr)
int *pcnt = (int *)ptr;
if (!rb_ractor_shareable_p(obj)) {
- *pcnt++;
+ ++*pcnt;
}
}