summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
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;