* numeric.c (dbl2ival): should raise FloatDomainError on Infinity
and NaN as 1.8 does. [ruby-dev:38726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b083b7eea6
commit
a82c5ee48b
@ -1,3 +1,8 @@
|
|||||||
|
Sat Jul 4 08:20:03 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* numeric.c (dbl2ival): should raise FloatDomainError on Infinity
|
||||||
|
and NaN as 1.8 does. [ruby-dev:38726]
|
||||||
|
|
||||||
Fri Jul 3 22:48:45 2009 Tanaka Akira <akr@fsij.org>
|
Fri Jul 3 22:48:45 2009 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* time.c (find_time_t): less number of guesses for hh:mm:60.
|
* time.c (find_time_t): less number of guesses for hh:mm:60.
|
||||||
|
@ -756,14 +756,8 @@ dbl2ival(double d)
|
|||||||
d = round(d);
|
d = round(d);
|
||||||
return LONG2FIX((long)d);
|
return LONG2FIX((long)d);
|
||||||
}
|
}
|
||||||
else if (isnan(d) || isinf(d)) {
|
|
||||||
/* special case: cannot return integer value */
|
|
||||||
return rb_float_new(d);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return rb_dbl2big(d);
|
return rb_dbl2big(d);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user