summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-19 11:43:23 (GMT)
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-19 11:43:23 (GMT)
commita7290749a5a6d4e0420d4b18a8153b25f86c34f2 (patch)
treefe97def7a4898e1288f1187f8ed52de71d1de229 /rational.c
parent666049981f1bb5a886a7ae837f800946f0192adb (diff)
* complex.c (make_patterns): do not use \d.
* rational.c (make_patterns): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r--rational.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rational.c b/rational.c
index a9e60eb..c14bc94 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