mirror of
https://github.com/ruby/ruby.git
synced 2025-09-23 04:24:04 +02:00
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
This commit is contained in:
parent
52a97e36d0
commit
62c17a2f21
4 changed files with 18 additions and 2 deletions
|
@ -815,9 +815,15 @@ class Rational_Test < Test::Unit::TestCase
|
|||
assert_nothing_raised(ZeroDivisionError) {
|
||||
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))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue