diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-28 16:34:11 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-28 16:34:11 +0000 |
commit | d1499525d5ea9d0b2d372406d414ea3679a939fb (patch) | |
tree | ba9ef000bc59f7a8ce7e6e1dad59ef137ec3b49a /bignum.c | |
parent | a715d95a8221ae80015ced9d80bf96c4d8b5b6e9 (diff) | |
download | ruby-d1499525d5ea9d0b2d372406d414ea3679a939fb.tar.gz |
* 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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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') : \ |