diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-05 15:52:02 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-05 15:52:02 +0000 |
commit | ecb66b55a5f4ccc29e2c18e97f47e3b9382700b2 (patch) | |
tree | c722e827a5b10bfb55bd90efd6a379a1e843036b /test/ruby | |
parent | dab8e101e3155af41e50c9e23c2a1eef243bc121 (diff) | |
download | ruby-ecb66b55a5f4ccc29e2c18e97f47e3b9382700b2.tar.gz |
math.c: fix tgamma
* math.c (ruby_tgamma): fix tgamma(-0.0) on mingw.
[ruby-core:74817] [Bug #12249]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_math.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_math.rb b/test/ruby/test_math.rb index e547cb77ec..c17b21a53d 100644 --- a/test/ruby/test_math.rb +++ b/test/ruby/test_math.rb @@ -255,6 +255,10 @@ class TestMath < Test::Unit::TestCase end assert_raise(Math::DomainError) { Math.gamma(-Float::INFINITY) } + x = Math.gamma(-0.0) + mesg = "Math.gamma(-0.0) should be -INF" + assert_infinity(x, mesg) + assert_predicate(x, :negative?, mesg) end def test_lgamma |