summaryrefslogtreecommitdiffstats
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
commit775819d51f74fb75697ee31f739c48544e288bf3 (patch)
tree3babd1780de60f5918ec26d7c516b2495d4302cc /bignum.c
parent8485eeaaaaf26bfc367a0f11572ae33f7830d775 (diff)
downloadruby-775819d51f74fb75697ee31f739c48544e288bf3.tar.gz
ruby-775819d51f74fb75697ee31f739c48544e288bf3.tar.xz
ruby-775819d51f74fb75697ee31f739c48544e288bf3.zip
* 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: http://svn.ruby-lang.org/repos/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 39d90aa92..bc4733408 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;