diff options
author | Koichi Sasada <ko1@atdot.net> | 2020-09-25 14:16:30 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2020-09-25 16:00:13 +0900 |
commit | 25cfb0c04007137e2dc6d82c2dadea067498f39a (patch) | |
tree | 74ea335dd2965c78210fa12effe41ee50f3717ed | |
parent | 96739c422206d55acab4aee917d9d965c27b6fff (diff) |
Range is based on Struct.
Range can be shareable because it is implemented by Struct.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3580
-rw-r--r-- | bootstraptest/test_ractor.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb index 5ed8f63958..ff99521a76 100644 --- a/bootstraptest/test_ractor.rb +++ b/bootstraptest/test_ractor.rb @@ -448,6 +448,9 @@ assert_equal "ok", %q{ [{a: 1}.freeze, 'str'.freeze].freeze, # nested frozen container S.new(1, 2).freeze, # frozen Struct S.new(1, 2, 3, 4).freeze, # frozen Struct + (1..2).freeze, # Range on Struct + (1..).freeze, # Range on Strcut + (..1).freeze, # Range on Strcut C, # class M, # module Ractor.current, # Ractor @@ -460,6 +463,7 @@ assert_equal "ok", %q{ S.new(1, 2), S.new(1, 2, 3, 4), S.new("a", 2).freeze, # frozen, but refers to an unshareable object + (1..2), (1..), (..1), ] results = [] |