From 8e9fbbf6d6f4c47286a6fbc4e2c4e77189be119b Mon Sep 17 00:00:00 2001 From: matz Date: Sat, 30 Aug 2003 00:04:02 +0000 Subject: * eval.c (struct BLOCK): remove BLOCKTAG, use scope instead. * eval.c (POP_TAG): no longer propagate retval. retval is now set directly by localjump_destination(). * eval.c (localjump_destination): new function to cast return/break local jump. * eval.c (rb_yield_0): stop TAG_RETURN/TAG_BREAK escaping. * variable.c (rb_autoload_load): call const_missing if autoloading constant is not defined to allow hook. * eval.c (rb_eval): use rb_const_get_from() instead of rb_const_get_at(). * eval.c (is_defined): forgot to check NODE_COLON3. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- sample/test.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sample') diff --git a/sample/test.rb b/sample/test.rb index 7e96f01567..1898813564 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -374,7 +374,7 @@ a,b,*c = loop do break *[*[]]; end; test_ok([a,b,c] == [nil,nil,[]]) a,b,*c = loop do break *[*[1]]; end; test_ok([a,b,c] == [1,nil,[]]) a,b,*c = loop do break *[*[1,2]]; end; test_ok([a,b,c] == [1,2,[]]) -def r(val); a = yield(); test_ok(a == val); end +def r(val); a = yield(); test_ok(a == val, 2); end r(nil){next} r(nil){next nil} r(1){next 1} @@ -396,7 +396,7 @@ r(nil){next *[*[]]} r(1){next *[*[1]]} r([1,2]){next *[*[1,2]]} -def r(val); *a = yield(); test_ok(a == val); end +def r(val); *a = yield(); test_ok(a == val, 2); end r([nil]){next} r([nil]){next nil} r([1]){next 1} @@ -409,7 +409,7 @@ r([[]]){next [*[]]} r([[1]]){next [*[1]]} r([[1,2]]){next [*[1,2]]} -def r(val); *a = *yield(); test_ok(a == val); end +def r(val); *a = *yield(); test_ok(a == val, 2); end r([nil]){next *nil} r([1]){next *1} r([nil]){next *[]} @@ -421,7 +421,7 @@ r([nil]){next *[*[]]} r([1]){next *[*[1]]} r([1,2]){next *[*[1,2]]} -def r(val); a,b,*c = yield(); test_ok([a,b,c] == val); end +def r(val); a,b,*c = yield(); test_ok([a,b,c] == val, 2); end r([nil,nil,[]]){next} r([nil,nil,[]]){next nil} r([1,nil,[]]){next 1} @@ -434,7 +434,7 @@ r([nil,nil,[]]){next [*[]]} r([1,nil,[]]){next [*[1]]} r([1,2,[]]){next [*[1,2]]} -def r(val); a,b,*c = *yield(); test_ok([a,b,c] == val); end +def r(val); a,b,*c = *yield(); test_ok([a,b,c] == val, 2); end r([nil,nil,[]]){next *nil} r([1,nil,[]]){next *1} r([nil,nil,[]]){next *[]} -- cgit v1.2.3