summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-30 00:04:02 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-30 00:04:02 +0000
commit8e9fbbf6d6f4c47286a6fbc4e2c4e77189be119b (patch)
tree2018232d06deec66076a9ddff0988f737c367366 /sample
parentda84ad63ee95265dfbdd51c370cdfe5f91e58d59 (diff)
* 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
Diffstat (limited to 'sample')
-rw-r--r--sample/test.rb10
1 files changed, 5 insertions, 5 deletions
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 *[]}