aboutsummaryrefslogtreecommitdiffstats
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/bignum.c b/bignum.c
index 3d66c8a1ad..27be47f64b 100644
--- a/bignum.c
+++ b/bignum.c
@@ -1916,12 +1916,7 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
#undef ISDIGIT
#define ISDIGIT(c) ('0' <= (c) && (c) <= '9')
-#define conv_digit(c) \
- (!ISASCII(c) ? -1 : \
- ISDIGIT(c) ? ((c) - '0') : \
- ISLOWER(c) ? ((c) - 'a' + 10) : \
- ISUPPER(c) ? ((c) - 'A' + 10) : \
- -1)
+#define conv_digit(c) (ruby_digit36_to_number_table[(unsigned char)(c)])
if (!str) {
if (badcheck) goto bad;