ruby-changes:64150
From: Nobuyoshi <ko1@a...>
Date: Mon, 14 Dec 2020 19:29:52 +0900 (JST)
Subject: [ruby-changes:64150] d19601fb56 (master): Test by Ractor.shareable?
https://git.ruby-lang.org/ruby.git/commit/?id=d19601fb56 From d19601fb569a2b3adea1bfb1938820314833a475 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 21 Oct 2020 14:35:42 +0900 Subject: Test by Ractor.shareable? diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index a9ab4c4..46c2ad5 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -1183,9 +1183,9 @@ x = __ENCODING__ https://github.com/ruby/ruby/blob/trunk/test/ruby/test_parse.rb#L1183 # shareable_constant_value: true A = [[1]] end; - assert_predicate(a, :frozen?) + assert_send([Ractor, :shareable?, a]) assert_equal([1], a[0]) - assert_predicate(a[0], :frozen?) + assert_send([Ractor, :shareable?, a[0]]) a, b = Class.new.class_eval("#{<<~"begin;"}\n#{<<~'end;'}") begin; # shareable_constant_value: false @@ -1195,10 +1195,10 @@ x = __ENCODING__ https://github.com/ruby/ruby/blob/trunk/test/ruby/test_parse.rb#L1195 B = [] [X::A, B] end; - assert_predicate(a, :frozen?) - assert_not_predicate(b, :frozen?) + assert_send([Ractor, :shareable?, a]) + assert_not_send([Ractor, :shareable?, b]) assert_equal([1], a[0]) - assert_predicate(a[0], :frozen?) + assert_send([Ractor, :shareable?, a[0]]) end =begin -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/