summaryrefslogtreecommitdiff
path: root/test
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 /test
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 'test')
-rw-r--r--test/drb/drbtest.rb25
-rw-r--r--test/ruby/test_iterator.rb14
2 files changed, 14 insertions, 25 deletions
diff --git a/test/drb/drbtest.rb b/test/drb/drbtest.rb
index bc16ab1ca2..d2c96f05c5 100644
--- a/test/drb/drbtest.rb
+++ b/test/drb/drbtest.rb
@@ -305,18 +305,19 @@ module DRbAry
assert_equal([1, 2, 'III', 'III', 4, 'five', 6], ary)
end
- def test_04_retry
- retried = false
- ary = []
- @there.each do |x|
- ary.push x
- if x == 4 && !retried
- retried = true
- retry
- end
- end
- assert_equal([1, 2, 'III', 4, 1, 2, 'III', 4, 'five', 6], ary)
- end
+ # retry in block is not supported on ruby 1.9
+ #def test_04_retry
+ # retried = false
+ # ary = []
+ # @there.each do |x|
+ # ary.push x
+ # if x == 4 && !retried
+ # retried = true
+ # retry
+ # end
+ # end
+ # assert_equal([1, 2, 'III', 4, 1, 2, 'III', 4, 'five', 6], ary)
+ #end
def test_05_break
ary = []
diff --git a/test/ruby/test_iterator.rb b/test/ruby/test_iterator.rb
index 067dd69b80..4b38ac806a 100644
--- a/test/ruby/test_iterator.rb
+++ b/test/ruby/test_iterator.rb
@@ -69,7 +69,7 @@ class TestIterator < Test::Unit::TestCase
end
end
- # iterator break/redo/next/retry
+ # iterator break/redo/next
def test_break
done = true
loop{
@@ -104,18 +104,6 @@ class TestIterator < Test::Unit::TestCase
end
assert_equal(7, $x.size)
assert_equal([1, 2, 3, 4, 5, 6, 7], $x)
-
- $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
- assert_equal(10, $x.size)
- assert_equal([1, 2, 3, 1, 2, 3, 4, 5, 6, 7], $x)
end
def test_append_method_to_built_in_class