mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
2 changed files with 6 additions and 7 deletions
|
@ -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>
|
||||
|
||||
* time.c (find_time_t): less number of guesses for hh:mm:60.
|
||||
|
|
|
@ -756,13 +756,7 @@ dbl2ival(double d)
|
|||
d = round(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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue