summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-28 16:34:11 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-28 16:34:11 +0000
commitd1499525d5ea9d0b2d372406d414ea3679a939fb (patch)
treeba9ef000bc59f7a8ce7e6e1dad59ef137ec3b49a /bignum.c
parenta715d95a8221ae80015ced9d80bf96c4d8b5b6e9 (diff)
* ext/bigdecimal/bigdecimal.c (BigDecimal_to_i): update RDoc to
denote that #to_i raises FloatDomainError for Inf and NaN. * ext/bigdecimal/bigdecimal.c (BigDecimal_to_i): fast #to_i using BigDecimal_split(). * bignum.c (conv_digit): use faster ISDIGIT() assuming ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bignum.c b/bignum.c
index b1d3e5a685..0b464f2f1f 100644
--- a/bignum.c
+++ b/bignum.c
@@ -437,6 +437,8 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
VALUE z;
BDIGIT *zds;
+#undef ISDIGIT
+#define ISDIGIT(c) ('0' <= (c) && (c) <= '9')
#define conv_digit(c) \
(!ISASCII(c) ? -1 : \
ISDIGIT(c) ? ((c) - '0') : \