diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-12 05:02:58 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-12 05:02:58 +0000 |
commit | 62c17a2f21b47243071075cbef37fe72b6ecd0ff (patch) | |
tree | 100d361f2c1256e4d29691fd2434d1fe5682273a /test/ruby/test_rational.rb | |
parent | 52a97e36d09ae15800c2a52094759c18e7be4ee0 (diff) |
No TypeError at nil if exception: false
[ruby-core:91021] [Bug #15525]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_rational.rb')
-rw-r--r-- | test/ruby/test_rational.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_rational.rb b/test/ruby/test_rational.rb index b289753347..a8cdf22a49 100644 --- a/test/ruby/test_rational.rb +++ b/test/ruby/test_rational.rb @@ -816,9 +816,15 @@ class Rational_Test < Test::Unit::TestCase assert_equal(nil, Rational("1/0", exception: false)) } assert_nothing_raised(TypeError) { + assert_equal(nil, Rational(nil, exception: false)) + } + assert_nothing_raised(TypeError) { assert_equal(nil, Rational(Object.new, exception: false)) } assert_nothing_raised(TypeError) { + assert_equal(nil, Rational(1, nil, exception: false)) + } + assert_nothing_raised(TypeError) { assert_equal(nil, Rational(1, Object.new, exception: false)) } |