aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_class.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_class.rb')
-rw-r--r--test/ruby/test_class.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb
index 0986e64fbb..bb8a3c574d 100644
--- a/test/ruby/test_class.rb
+++ b/test/ruby/test_class.rb
@@ -241,15 +241,23 @@ class TestClass < Test::Unit::TestCase
assert_equal("TestClass::C\u{df}", c.name, '[ruby-core:24600]')
end
- def test_invalid_jump_from_class_definition
+ def test_invalid_next_from_class_definition
assert_raise(SyntaxError) { eval("class C; next; end") }
+ end
+
+ def test_invalid_break_from_class_definition
assert_raise(SyntaxError) { eval("class C; break; end") }
+ end
+
+ def test_invalid_redo_from_class_definition
assert_raise(SyntaxError) { eval("class C; redo; end") }
+ end
+
+ def test_invalid_retry_from_class_definition
assert_raise(SyntaxError) { eval("class C; retry; end") }
end
def test_invalid_return_from_class_definition
- skip "Wrongly return from this method"
assert_raise(SyntaxError) { eval("class C; return; end") }
end