summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-19 09:03:11 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-19 09:03:11 +0000
commit6d2e56ce7c3e7e53745105ed2d1011e522bcbbbe (patch)
tree23aee851c864b85cc51a60cd34e8dc4d2f700d13 /sample
parent7632b48a7dc19870c04f6769f473dfb13abe2410 (diff)
* re.c (rb_reg_search): should clear last_match if pos is out of
string range. * string.c (rb_str_index_m): ditto. * string.c (rb_str_rindex): ditto. * class.c (rb_define_class): should handle autoload. * class.c (rb_define_module): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/sample/test.rb b/sample/test.rb
index 82b159a..b207120 100644
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -999,6 +999,18 @@ proc{
}.call
test_ok(!defined?(iii)) # out of scope
+loop{iii=5; test_ok(eval("defined? iii")); break}
+loop {|iii|
+ iii = 10
+ def dyna_var_check
+ loop {
+ test_ok(!defined?(iii))
+ break
+ }
+ end
+ dyna_var_check
+ break
+}
$x=0
$proc.call(5)
$proc2.call