mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* bignum.c (rb_big2db): (-Float::MAX.to_i*2).to_f should return
-HUGE_VAL (-Infinity). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c6cb57262d
commit
04388f9f9d
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Jun 15 22:35:31 2009 Tadayoshi Funaba <tadf@dotrb.org>
|
||||
|
||||
* bignum.c (rb_big2db): (-Float::MAX.to_i*2).to_f should return
|
||||
-HUGE_VAL (-Infinity).
|
||||
|
||||
Mon Jun 15 18:48:41 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* io.c (argf_each_line): should return self. [ruby-core:23852]
|
||||
|
|
5
bignum.c
5
bignum.c
|
@ -1233,7 +1233,10 @@ rb_big2dbl(VALUE x)
|
|||
|
||||
if (isinf(d)) {
|
||||
rb_warning("Bignum out of Float range");
|
||||
d = HUGE_VAL;
|
||||
if (signbit(d))
|
||||
d = -HUGE_VAL;
|
||||
else
|
||||
d = HUGE_VAL;
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue