File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -1609,6 +1609,24 @@ class X
16091609 assert_ractor_shareable ( a [ 0 ] )
16101610 end
16111611
1612+ def test_shareable_constant_value_hash_with_keyword_splat
1613+ a , b = eval_separately ( "#{ <<~"begin;" } \n #{ <<~'end;' } " )
1614+ begin;
1615+ # shareable_constant_value: experimental_everything
1616+ x = { x: {} }
1617+ y = { y: {} }
1618+ A = { **x }
1619+ B = { x: 1, **y }
1620+ [A, B]
1621+ end;
1622+ assert_ractor_shareable ( a )
1623+ assert_ractor_shareable ( b )
1624+ assert_equal ( { x : { } } , a )
1625+ assert_equal ( { x : 1 , y : { } } , b )
1626+ rescue NotImplementedError
1627+ # Skip prism
1628+ end
1629+
16121630 def test_shareable_constant_value_unshareable_literal
16131631 assert_raise_separately ( Ractor ::IsolationError , /unshareable object to C/ ,
16141632 "#{ <<~"begin;" } \n #{ <<~'end;' } " )
You can’t perform that action at this time.
0 commit comments