diff options
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_ractor.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb index c587c2c1eb..797ad0a3ee 100644 --- a/bootstraptest/test_ractor.rb +++ b/bootstraptest/test_ractor.rb @@ -1149,6 +1149,14 @@ assert_equal '[:ok, false, false]', %q{ [(Ractor.make_shareable(x) rescue :ok), Ractor.shareable?(x), Ractor.shareable?(y)] } +# Ractor.make_shareable with Class/Module +assert_equal '[C, M]', %q{ + class C; end + module M; end + + Ractor.make_shareable(ary = [C, M]) +} + # define_method() can invoke different Ractor's proc if the proc is shareable. assert_equal '1', %q{ class C @@ -1191,7 +1199,6 @@ assert_equal '[false, false, true, true]', %q{ r } - # Ractor deep copies frozen objects (ary) assert_equal '[true, false]', %q{ Ractor.new([[]].freeze) { |ary| |