From 41c533446ffd10c25ef02cee0e7c5a4b1a69146c Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 5 Apr 2016 15:52:02 +0000 Subject: 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 --- test/ruby/test_math.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/ruby') 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 -- cgit v1.2.3