diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | bignum.c | 5 |
2 files changed, 9 insertions, 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] @@ -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; } |