File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1091,7 +1091,7 @@ def rb_yield(value)
1091
1091
end
1092
1092
1093
1093
def rb_yield_splat ( values )
1094
- Truffle . invoke_primitive ( :interop_call_c_with_mutex , rb_block_proc , [ values ] )
1094
+ Truffle . invoke_primitive ( :interop_call_c_with_mutex , rb_block_proc , values )
1095
1095
end
1096
1096
1097
1097
def rb_ivar_lookup ( object , name , default_value )
Original file line number Diff line number Diff line change 244
244
@s . rb_yield_splat ( [ 1 , 2 ] ) { |x , y | x + y } . should == 3
245
245
end
246
246
247
+ it "passes arguments to a block accepting splatted args" do
248
+ @s . rb_yield_splat ( [ 1 , 2 ] ) { |*v | v } . should == [ 1 , 2 ]
249
+ end
250
+
247
251
it "raises LocalJumpError when no block is given" do
248
252
lambda { @s . rb_yield_splat ( [ 1 , 2 ] ) } . should raise_error ( LocalJumpError )
249
253
end
You can’t perform that action at this time.
0 commit comments