summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-19 08:46:49 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-19 08:46:49 +0000
commit860b40fd631f280fbc9164abdc36409dcfac7e27 (patch)
tree6e0a3bdc3ea2561c64a5d2846ab306308b4881b6 /sample
parentdef4a99af2081b428b91e8d00c74dd36caa230ca (diff)
* compile.c (iseq_compile_each): remove "retry" in block.
("iter{retry}" cause syntax error) Currently, "begin; ...; rescue; iter{retry}; end" cause syntax error too. * bootstraptest/test_jump.rb: ditto. * lib/drb/invokemethod.rb: ditto. * sample/drb/darrayc.rb: ditto. * sample/test.rb: ditto. * test/drb/drbtest.rb: ditto. * test/ruby/test_iterator.rb: ditto. * sample/test.rb: add a 'test' directory on the SYSTEM test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/drb/darrayc.rb12
-rw-r--r--sample/test.rb14
2 files changed, 1 insertions, 25 deletions
diff --git a/sample/drb/darrayc.rb b/sample/drb/darrayc.rb
index 6f5ff6bb5d..b181d22699 100644
--- a/sample/drb/darrayc.rb
+++ b/sample/drb/darrayc.rb
@@ -45,15 +45,3 @@ ro.each do |x|
puts count
redo if count == 3
end
-
-puts "# each, retry"
-retried = false
-ro.each do |x|
- puts x
- if x == 4 && !retried
- puts 'retry'
- retried = true
- retry
- end
-end
-
diff --git a/sample/test.rb b/sample/test.rb
index 4d99a700e4..4cbddabfbf 100644
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -916,18 +916,6 @@ end
test_ok($x.size == 7)
test_ok($x == [1, 2, 3, 4, 5, 6, 7])
-$done = false
-$x = []
-for i in 1 .. 7 # see how retry works in iterator loop
- if i == 4 and not $done
- $done = true
- retry
- end
- $x.push(i)
-end
-test_ok($x.size == 10)
-test_ok($x == [1, 2, 3, 1, 2, 3, 4, 5, 6, 7])
-
# append method to built-in class
class Array
def iter_test1
@@ -1887,7 +1875,7 @@ rescue Exception
false
end
-for script in Dir["#{dir}{lib,sample,ext}/**/*.rb"]
+for script in Dir["#{dir}{lib,sample,ext,test}/**/*.rb"]
unless valid_syntax? IO::read(script), script
STDERR.puts script
$bad = true