aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_class.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-02 12:45:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-02 12:45:37 +0000
commit8ee30ab6f7643ec66b7164d9848a38e5cfafd323 (patch)
tree05dc91257e7810083765c116a464f1fcfd6d9f12 /test/ruby/test_class.rb
parentfe1ad67c28492e32b469bd24b6722588c3f6f7bc (diff)
downloadruby-8ee30ab6f7643ec66b7164d9848a38e5cfafd323.tar.gz
skip/fix wrong tests
* test/ruby/test_{class,eval}.rb: skip or fix wrong tests hidden by a bug of assert_raise. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_class.rb')
-rw-r--r--test/ruby/test_class.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb
index f2e89c0f26..0986e64fbb 100644
--- a/test/ruby/test_class.rb
+++ b/test/ruby/test_class.rb
@@ -246,8 +246,15 @@ class TestClass < Test::Unit::TestCase
assert_raise(SyntaxError) { eval("class C; break; end") }
assert_raise(SyntaxError) { eval("class C; redo; end") }
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") }
- assert_raise(SyntaxError) { eval("class C; yield; end") }
+ end
+
+ def test_invalid_yield_from_class_definition
+ assert_raise(LocalJumpError) { eval("class C; yield; end") }
end
def test_clone