summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-02-20 07:42:03 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-02-20 07:42:03 +0000
commit88eef2d7fec7a3380f495d768c72d1292260ea18 (patch)
tree3babd1780de60f5918ec26d7c516b2495d4302cc /bignum.c
parent86833594ff917d578aa24a4536995fa6573300a6 (diff)
* configure.in: add check for negative time_t for gmtime(3).
* time.c (time_new_internal): no positive check if gmtime(3) can handle negative time_t. * time.c (time_timeval): ditto. * bignum.c (rb_big2long): should not raise RangeError for Bignum LONG_MIN value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bignum.c b/bignum.c
index 39d90aa92d..bc4733408b 100644
--- a/bignum.c
+++ b/bignum.c
@@ -467,7 +467,7 @@ rb_big2long(x)
{
unsigned long num = big2ulong(x, "int");
- if ((long)num < 0) {
+ if ((long)num < 0 && (long)num != LONG_MIN) {
rb_raise(rb_eRangeError, "bignum too big to convert into `int'");
}
if (!RBIGNUM(x)->sign) return -(long)num;