summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bignum.c b/bignum.c
index bc4733408b..63384f7ab2 100644
--- a/bignum.c
+++ b/bignum.c
@@ -209,6 +209,10 @@ rb_cstr2inum(str, base)
str++;
sign = 0;
}
+ if (str[0] == '+' || str[0] == '-') {
+ if (badcheck) goto bad;
+ return INT2FIX(0);
+ }
if (base == 0) {
if (str[0] == '0') {
if (str[1] == 'x' || str[1] == 'X') {