summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2026-03-24 12:25:24 +0100
committerJean Boussier <jean.boussier@gmail.com>2026-04-01 11:43:55 +0100
commit9a2ffd8e5448e0c2ac4ae58d0ef02afc195f2cb8 (patch)
treec953869e88792caf1a133efedb375a8cad187e42 /bootstraptest
parent3f1acedb62a0dbb2509e05ea314f6cd3383247b6 (diff)
Fix sending backtraces across ractors
[Bug #21818] Currently exceptions can be sent across ractors, but because of a limitation in the TypedData API, the exception backtrace is duped as an empty backtrace. The problem is that backtraces are embedded objects, hence the classic `rb_class_alloc(klass)` API is insufficient because we need to know the size of the Backtrace object we're duping to instantiate the copy. This is worked around by changing Ractors to call `#clone` on objects rather than use `rb_obj_clone`, and to implement `Thread::Backtrace#clone` to properly clone the variable size object.
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_ractor.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb
index 040943a0b9..987f146dc6 100644
--- a/bootstraptest/test_ractor.rb
+++ b/bootstraptest/test_ractor.rb
@@ -507,7 +507,7 @@ assert_equal 'false', %q{
}
# To copy the object, now Marshal#dump is used
-assert_match /can not copy unshareable object/, %q{
+assert_match /can't clone unshareable instance of Thread/, %q{
obj = Thread.new{}
begin
r = Ractor.new obj do |msg|