Skip to content

Commit b5756b0

Browse files
committed
Add tests for modifying rest args before post args.
1 parent d7ccbed commit b5756b0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

spec/ruby/language/super_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,13 @@ def obj.foobar(array)
303303
SuperSpecs::ZSuperWithRestOthersAndPost::B.new.m(1, 2).should == []
304304
end
305305

306+
it "without explicit arguments passes arguments, rest arguments including modifications, and post arguments" do
307+
SuperSpecs::ZSuperWithRestAndPost::B.new.m_modified(1, 2, 3, 4, 5).should == [1, 14, 3]
308+
SuperSpecs::ZSuperWithRestOthersAndPost::B.new.m_modified(1, 2, 3, 4, 5).should == [2, 14, 4]
309+
SuperSpecs::ZSuperWithRestAndPost::B.new.m_modified(1, 2).should == [nil, 14]
310+
SuperSpecs::ZSuperWithRestOthersAndPost::B.new.m_modified(1, 2).should == [nil, 14]
311+
end
312+
306313
it "without explicit arguments passes arguments and rest arguments including any modifications" do
307314
SuperSpecs::ZSuperWithRestAndOthers::B.new.m_modified(1, 2, 3, 4, 5).should == [3, 14, 5]
308315
end

0 commit comments

Comments
 (0)