Fixes to bignum/numeric so that infinity is always greater than any num.
configure.in fixes to earlier breakage regarding using $libdir for determining lib dirs, instead of $prefix/lib. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@24107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9198878139
commit
63714e935a
|
@ -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)
|
||||
|
|
10
bignum.c
10
bignum.c
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue