summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bignum.c b/bignum.c
index f56d5a6377..31a5f58c24 100644
--- a/bignum.c
+++ b/bignum.c
@@ -464,6 +464,9 @@ rb_cstr_to_inum(str, base, badcheck)
}
continue;
}
+ else if (!ISASCII(c)) {
+ break;
+ }
else if (isdigit(c)) {
c -= '0';
}