summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-29 17:47:24 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-29 17:47:24 +0000
commit525336fcc97a0c0fc8dae2e6f9fe63dfc6e645ab (patch)
tree23b84c6d3aa98723fea6577ecedbb3d15a49baba /sample
parent2e0b6e28ada7713aab10343c2850f32dec4652ac (diff)
* eval.c (proc_invoke): single array value to normal Proc#call
(i.e. not via lambda call), should be treated just like yield. [ruby-dev:21726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/test.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/sample/test.rb b/sample/test.rb
index 02befbe..6488558 100644
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -151,13 +151,13 @@ def f; yield *[*[1,2]]; end; f {|*a| test_ok(a == [1,2])}
def f; yield; end; f {|a,b,*c| test_ok([a,b,c] == [nil,nil,[]])}
def f; yield nil; end; f {|a,b,*c| test_ok([a,b,c] == [nil,nil,[]])}
def f; yield 1; end; f {|a,b,*c| test_ok([a,b,c] == [1,nil,[]])}
-def f; yield []; end; f {|a,b,*c| test_ok([a,b,c] == [[],nil,[]])}
-def f; yield [1]; end; f {|a,b,*c| test_ok([a,b,c] == [[1],nil,[]])}
-def f; yield [nil]; end; f {|a,b,*c| test_ok([a,b,c] == [[nil],nil,[]])}
-def f; yield [[]]; end; f {|a,b,*c| test_ok([a,b,c] == [[[]],nil,[]])}
-def f; yield [*[]]; end; f {|a,b,*c| test_ok([a,b,c] == [[],nil,[]])}
-def f; yield [*[1]]; end; f {|a,b,*c| test_ok([a,b,c] == [[1],nil,[]])}
-def f; yield [*[1,2]]; end; f {|a,b,*c| test_ok([a,b,c] == [[1,2],nil,[]])}
+def f; yield []; end; f {|a,b,*c| test_ok([a,b,c] == [nil,nil,[]])}
+def f; yield [1]; end; f {|a,b,*c| test_ok([a,b,c] == [1,nil,[]])}
+def f; yield [nil]; end; f {|a,b,*c| test_ok([a,b,c] == [nil,nil,[]])}
+def f; yield [[]]; end; f {|a,b,*c| test_ok([a,b,c] == [[],nil,[]])}
+def f; yield [*[]]; end; f {|a,b,*c| test_ok([a,b,c] == [nil,nil,[]])}
+def f; yield [*[1]]; end; f {|a,b,*c| test_ok([a,b,c] == [1,nil,[]])}
+def f; yield [*[1,2]]; end; f {|a,b,*c| test_ok([a,b,c] == [1,2,[]])}
def f; yield *nil; end; f {|a,b,*c| test_ok([a,b,c] == [nil,nil,[]])}
def f; yield *1; end; f {|a,b,*c| test_ok([a,b,c] == [1,nil,[]])}