diff options
Diffstat (limited to 'test/ruby/test_case.rb')
| -rw-r--r-- | test/ruby/test_case.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/ruby/test_case.rb b/test/ruby/test_case.rb index 4a0f1bf78d..9e8502fb27 100644 --- a/test/ruby/test_case.rb +++ b/test/ruby/test_case.rb @@ -68,10 +68,13 @@ class TestCase < Test::Unit::TestCase assert(false) end - assert_raise(NameError) do - case - when false, *x, false + begin + verbose_bak, $VERBOSE = $VERBOSE, nil + assert_raise(NameError) do + eval("case; when false, *x, false; end") end + ensure + $VERBOSE = verbose_bak end end |
