From 2025bee606e4529cf2505df9daa88f15d1c1da97 Mon Sep 17 00:00:00 2001 From: yugui Date: Sun, 21 Jun 2009 09:15:52 +0000 Subject: merges r23695 and r23698 from trunk into ruby_1_9_1. -- * bignum.c (rb_big2db): (-Float::MAX.to_i*2).to_f should return -HUGE_VAL (-Infinity). -- avoid signbit() and adjust indentation. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@23789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ bignum.c | 5 ++++- version.h | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c82e77760..3d2224faa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jun 15 22:35:31 2009 Tadayoshi Funaba + + * 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 * io.c (argf_each_line): should return self. [ruby-core:23852] diff --git a/bignum.c b/bignum.c index 5a608774e..eb021b801 100644 --- a/bignum.c +++ b/bignum.c @@ -1213,7 +1213,10 @@ rb_big2dbl(VALUE x) if (isinf(d)) { rb_warning("Bignum out of Float range"); - d = HUGE_VAL; + if (d < 0.0) + d = -HUGE_VAL; + else + d = HUGE_VAL; } return d; } diff --git a/version.h b/version.h index 4f760c134..880ac6aac 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ #define RUBY_VERSION "1.9.1" #define RUBY_RELEASE_DATE "2009-05-22" -#define RUBY_PATCHLEVEL 179 +#define RUBY_PATCHLEVEL 180 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 -- cgit