@@ -74,14 +74,18 @@ def test_recv
7474 end
7575
7676 def test_receive_if
77+ omit "Ractor.receive_if is not implemented" if RUBY_VERSION >= "3.5"
78+
7779 Ractor . current . send 42
7880 assert_send_type "() { (Integer) -> bool } -> Integer" ,
7981 Ractor , :receive_if do |n | n == 42 end
8082 end
8183
8284 def test_select
83- r1 = Ractor . new { loop { Ractor . yield 42 } }
84- r2 = Ractor . new { loop { Ractor . yield 43 } }
85+ omit "Ractor#yield is not implemented" if RUBY_VERSION >= "3.5"
86+
87+ r1 = Ractor . new { |r | loop { Ractor . yield 42 } }
88+ r2 = Ractor . new { |r | loop { Ractor . yield 43 } }
8589
8690 assert_send_type "(Ractor) -> [Ractor, Integer]" ,
8791 Ractor , :select , r1
@@ -115,6 +119,8 @@ def test_store_if_absent
115119 end
116120
117121 def test_yield
122+ omit "Ractor#yield is not implemented" if RUBY_VERSION >= "3.5"
123+
118124 Ractor . new ( Ractor . current ) { |r | loop { r . take } }
119125
120126 assert_send_type "(Integer) -> untyped" ,
@@ -153,12 +159,16 @@ def test_aset
153159 end
154160
155161 def test_close_incoming
162+ omit "Ractor#close_incoming is not implemented" if RUBY_VERSION >= "3.5"
163+
156164 r = Ractor . new { }
157165 assert_send_type "() -> bool" ,
158166 r , :close_incoming
159167 end
160168
161169 def test_close_outgoing
170+ omit "Ractor#close_outgoing is not implemented" if RUBY_VERSION >= "3.5"
171+
162172 r = Ractor . new { }
163173 assert_send_type "() -> bool" ,
164174 r , :close_outgoing
@@ -190,6 +200,8 @@ def test_send
190200 end
191201
192202 def test_take
203+ omit "Ractor#take is not implemented" if RUBY_VERSION >= "3.5"
204+
193205 r = Ractor . new { 42 }
194206
195207 assert_send_type "() -> Integer" ,
0 commit comments