summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-06 18:02:59 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-06 18:02:59 +0000
commitfcd2fb4e871f3787f34b05cffeb7e5df7b04f29f (patch)
tree343a573d405f6d7dbd78090f003517be31837dd6
parentb09eabd430d92cdae011bb7ad08a3300049a4392 (diff)
* math.c (math_lgamma): initialize sign because
lgamma(NaN) doesn't set the sign in OpenSolaris. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--math.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b51a4050e6..ef3593b8df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Feb 7 03:01:46 2010 Tanaka Akira <akr@fsij.org>
+
+ * math.c (math_lgamma): initialize sign because
+ lgamma(NaN) doesn't set the sign in OpenSolaris.
+
Sun Feb 7 00:23:21 2010 Shugo Maeda <shugo@ruby-lang.org>
* class.c (rb_class_init_copy): raise a TypeError if the argument is
diff --git a/math.c b/math.c
index 1d7d5e4188..027932dee9 100644
--- a/math.c
+++ b/math.c
@@ -710,7 +710,7 @@ static VALUE
math_lgamma(VALUE obj, VALUE x)
{
double d0, d;
- int sign;
+ int sign=1;
VALUE v;
Need_Float(x);
errno = 0;