diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-19 11:43:23 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-19 11:43:23 +0000 |
commit | 59c2a7c222855e5a3cfbfa2740a09442760b116c (patch) | |
tree | fe97def7a4898e1288f1187f8ed52de71d1de229 /rational.c | |
parent | 01806711bd0bd3f43c6bcc804de62213235e27fd (diff) | |
download | ruby-59c2a7c222855e5a3cfbfa2740a09442760b116c.tar.gz ruby-59c2a7c222855e5a3cfbfa2740a09442760b116c.tar.xz ruby-59c2a7c222855e5a3cfbfa2740a09442760b116c.zip |
* complex.c (make_patterns): do not use \d.
* rational.c (make_patterns): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r-- | rational.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rational.c b/rational.c index a9e60ebc0..c14bc9468 100644 --- a/rational.c +++ b/rational.c @@ -1723,7 +1723,7 @@ float_to_r(VALUE self) static VALUE rat_pat, an_e_pat, a_dot_pat, underscores_pat, an_underscore; #define WS "\\s*" -#define DIGITS "(?:\\d(?:_\\d|\\d)*)" +#define DIGITS "(?:[0-9](?:_[0-9]|[0-9])*)" #define NUMERATOR "(?:" DIGITS "?\\.)?" DIGITS "(?:[eE][-+]?" DIGITS ")?" #define DENOMINATOR DIGITS #define PATTERN "\\A" WS "([-+])?(" NUMERATOR ")(?:\\/(" DENOMINATOR "))?" WS |