diff --git a/test/ruby/test_sprintf.rb b/test/ruby/test_sprintf.rb index cad9f5e031..c2669a7131 100644 --- a/test/ruby/test_sprintf.rb +++ b/test/ruby/test_sprintf.rb @@ -179,7 +179,10 @@ class TestSprintf < Test::Unit::TestCase assert_raise(ArgumentError) { sprintf("%!", 1) } assert_raise(ArgumentError) { sprintf("%1$1$d", 1) } assert_raise(ArgumentError) { sprintf("%0%") } + verbose, $VERBOSE = $VERBOSE, nil assert_nothing_raised { sprintf("", 1) } + ensure + $VERBOSE = verbose end def test_float