mirror of
https://github.com/ruby/ruby.git
synced 2025-09-23 04:24:04 +02:00
test/ruby: suppress runtime warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
41f4317f45
commit
c7f815eed8
10 changed files with 36 additions and 29 deletions
|
@ -904,7 +904,8 @@ class Rational_Test < Test::Unit::TestCase
|
|||
|
||||
def test_fixed_bug
|
||||
n = Float::MAX.to_i * 2
|
||||
assert_equal(1.0, Rational(n + 2, n + 1).to_f, '[ruby-dev:33852]')
|
||||
x = EnvUtil.suppress_warning {Rational(n + 2, n + 1).to_f}
|
||||
assert_equal(1.0, x, '[ruby-dev:33852]')
|
||||
end
|
||||
|
||||
def test_power_of_1_and_minus_1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue