diff options
Diffstat (limited to 'sample')
-rw-r--r-- | sample/test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sample/test.rb b/sample/test.rb index f7612736c3..b785d2db9f 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -127,6 +127,13 @@ a,b,*c = *[*[1,2]]; test_ok([a,b,c] == [1,2,[]]) def f; yield nil; end; f {|a| test_ok(a == nil)} def f; yield 1; end; f {|a| test_ok(a == 1)} +def f; yield []; end; f {|a| test_ok(a == [])} +def f; yield [1]; end; f {|a| test_ok(a == [1])} +def f; yield [nil]; end; f {|a| test_ok(a == [nil])} +def f; yield [[]]; end; f {|a| test_ok(a == [[]])} +def f; yield [*[]]; end; f {|a| test_ok(a == [])} +def f; yield [*[1]]; end; f {|a| test_ok(a == [1])} +def f; yield [*[1,2]]; end; f {|a| test_ok(a == [1,2])} def f; yield *[]; end; f {|a| test_ok(a == [])} def f; yield *[1]; end; f {|a| test_ok(a == [1])} def f; yield *[nil]; end; f {|a| test_ok(a == [nil])} |