diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | bignum.c | 10 | ||||
-rw-r--r-- | configure.in | 8 | ||||
-rw-r--r-- | numeric.c | 4 | ||||
-rw-r--r-- | version.h | 6 |
5 files changed, 26 insertions, 8 deletions
@@ -1,3 +1,9 @@ +Mon Jul 13 12:00:00 2009 Kirk Haines <khaines@ruby-lang.org> + + * numeric.c, bignum.c: Applied changes from r23730. Infinity is > any bignum number in comparisons. + + * configure.in: fixed problems with using $libdir instead of $prefix/lib for RUBY_LIB and friends. + Fri Jul 10 04:00:00 2009 Kirk Haines <khaines@ruby-lang.org> * file.c: Added FCNTL inclusion to fix a compile error with solaris (backport from r22812) @@ -987,7 +987,15 @@ rb_big_cmp(x, y) break; case T_FLOAT: - return rb_dbl_cmp(rb_big2dbl(x), RFLOAT(y)->value); + { + double a = RFLOAT(y)->value; + + if (isinf(a)) { + if (a > 0.0) return INT2FIX(-1); + else return INT2FIX(1); + } + return rb_dbl_cmp(rb_big2dbl(x), a); + } default: return rb_num_coerce_cmp(x, y); diff --git a/configure.in b/configure.in index bd0763831e..312a842a8a 100644 --- a/configure.in +++ b/configure.in @@ -1323,6 +1323,10 @@ if test "$prefix" = NONE; then prefix=$ac_default_prefix fi +if test "$exec_prefix" = NONE; then + exec_prefix=$prefix +fi + #if test "$fat_binary" != no ; then # CFLAGS="$CFLAGS $ARCH_FLAG" #fi @@ -1614,7 +1618,7 @@ case "$target_os" in RUBY_LIB_PREFIX="/lib/ruby" ;; *) - RUBY_LIB_PREFIX="${libdir}/ruby" + RUBY_LIB_PREFIX="`eval "echo ${libdir}"`/ruby" ;; esac RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${MAJOR}.${MINOR}" @@ -1622,7 +1626,7 @@ RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${MAJOR}.${MINOR}" AC_ARG_WITH(sitedir, [ --with-sitedir=DIR site libraries in DIR [PREFIX/lib/ruby/site_ruby]], [sitedir=$withval], - [sitedir='${libdir}/ruby/site_ruby']) + [sitedir="`eval "echo ${libdir}"`/lib/ruby/site_ruby"]) SITE_DIR=`eval echo \\"${sitedir}\\"` case "$target_os" in cygwin*|mingw*|*djgpp*|os2-emx*) @@ -933,6 +933,10 @@ flo_cmp(x, y) break; case T_BIGNUM: + if (isinf(a)) { + if (a > 0.0) return INT2FIX(1); + else return INT2FIX(-1); + } b = rb_big2dbl(y); break; @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2009-06-08" #define RUBY_VERSION_CODE 186 #define RUBY_RELEASE_CODE 20090608 -#define RUBY_PATCHLEVEL 378 +#define RUBY_PATCHLEVEL 379 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 @@ -18,7 +18,3 @@ RUBY_EXTERN const char ruby_platform[]; RUBY_EXTERN const int ruby_patchlevel; #endif - - - - |