diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-22 23:49:40 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-22 23:49:40 +0000 |
commit | c053c35ecd4a83ff2b89270f06d7620d93b2c8f8 (patch) | |
tree | 3cb083d98bb165b0c650fff58d4573408f917286 /test | |
parent | c6da8470b9f1f317825e55e28ed1ec1201a7ecf7 (diff) | |
download | ruby-c053c35ecd4a83ff2b89270f06d7620d93b2c8f8.tar.gz |
rational.c: infinity in power
* rational.c (nurat_expt): return 0 due to overflow.
[ruby-core:79686] [Bug #13242]:
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_rational.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_rational.rb b/test/ruby/test_rational.rb index c1e7d824d1..e0cb8db99e 100644 --- a/test/ruby/test_rational.rb +++ b/test/ruby/test_rational.rb @@ -959,6 +959,8 @@ class Rational_Test < Test::Unit::TestCase bug = '[ruby-core:79686] [Bug #13242]: Infinity due to overflow' x = EnvUtil.suppress_warning {4r**40000000} assert_predicate x, :infinite?, bug + x = EnvUtil.suppress_warning {(1/4r)**40000000} + assert_equal 0, x, bug end def test_positive_p |