summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-23 13:37:59 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-23 13:37:59 +0000
commitba595fe918f57f851b117926db9be1087c881de1 (patch)
treee913b2001f896dba289c093d3434e5267726c0e3 /complex.c
parent3ae8d8aa4dbd4406a3033e8a4d9f9fd55ec99707 (diff)
merges r24205 from trunk into ruby_1_9_1.
-- * complex.c (make_patterns): do not use \d. * rational.c (make_patterns): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@27981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/complex.c b/complex.c
index 092289d500..dbaf400c8f 100644
--- a/complex.c
+++ b/complex.c
@@ -1054,7 +1054,7 @@ static VALUE comp_pat0, comp_pat1, comp_pat2, a_slash, a_dot_and_an_e,
null_string, 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 NUMBER "[-+]?" NUMERATOR "(?:\\/" DENOMINATOR ")?"