mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@9277d27
This commit is contained in:
parent
ce986b41ca
commit
201d501640
17 changed files with 209 additions and 6 deletions
|
@ -238,6 +238,18 @@ describe "C-API Kernel function" do
|
|||
end
|
||||
end
|
||||
|
||||
describe "rb_yield_values2" do
|
||||
it "yields passed arguments" do
|
||||
ret = nil
|
||||
@s.rb_yield_values2([1, 2]) { |x, y| ret = x + y }
|
||||
ret.should == 3
|
||||
end
|
||||
|
||||
it "returns the result from block evaluation" do
|
||||
@s.rb_yield_values2([1, 2]) { |x, y| x + y }.should == 3
|
||||
end
|
||||
end
|
||||
|
||||
describe "rb_yield_splat" do
|
||||
it "yields with passed array's contents" do
|
||||
ret = nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue