diff options
Diffstat (limited to 'test/ruby/test_float.rb')
-rw-r--r-- | test/ruby/test_float.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb index 3453440694..02bafb0303 100644 --- a/test/ruby/test_float.rb +++ b/test/ruby/test_float.rb @@ -802,6 +802,12 @@ class TestFloat < Test::Unit::TestCase assert_raise(ArgumentError, bug4310) {under_gc_stress {Float('a'*10000)}} end + def test_Float_with_invalid_exception + assert_raise(ArgumentError) { + Float("0", exception: 1) + } + end + def test_Float_with_exception_keyword assert_raise(ArgumentError) { Float(".", exception: true) |