summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-28 02:27:06 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-28 02:27:06 +0000
commita1096ba77cc2da7bb04f8948faad994a7d171363 (patch)
tree06e9555470d74cfaebb9fe0b69397fd7d66f4cd4 /sample
parented5208d851e5cfc846a4b9c70c466b0bdb0a8cc5 (diff)
* parse.y (new_yield): remove magic argument rule; "yield [1,2]"
should yield single array of two elements, not two values. [ruby-dev:21726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4848 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 6488558..02befbe 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,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 []; 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 *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,[]])}