diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-07-11 19:20:53 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-07-11 20:04:29 +0900 |
commit | 3e7d002118a92fad5934e11c75be6768a1476c1b (patch) | |
tree | e9f437327b5c743622a97c092ddadc2d99cb0bc5 /test/ruby/test_integer.rb | |
parent | cd069df36596d9bf7a6db8aaa0dcefdafb233a91 (diff) |
Check exception flag as a bool [Bug #15987]
Diffstat (limited to 'test/ruby/test_integer.rb')
-rw-r--r-- | test/ruby/test_integer.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_integer.rb b/test/ruby/test_integer.rb index 2334cab50a..84730b2a5d 100644 --- a/test/ruby/test_integer.rb +++ b/test/ruby/test_integer.rb @@ -193,6 +193,12 @@ class TestInteger < Test::Unit::TestCase end def test_Integer_with_exception_keyword + assert_raise(ArgumentError) { + Integer("0", exception: 1) + } + end + + def test_Integer_with_exception_keyword assert_nothing_raised(ArgumentError) { assert_equal(nil, Integer("1z", exception: false)) } |