summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-06-06 07:40:31 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-06-06 07:40:31 +0000
commitf0ccffd530ff4faafe6f07df94818e807b96f851 (patch)
tree6e79e20879d3ea025b6eda42b0084f56789772d0 /regex.c
parent7c9c33e9add999d2c9a9073de5130936e4124c9c (diff)
* eval.c (rb_load): should check if tainted even when wrap is
specified. * regex.c (re_compile_pattern): too much optimization for the cases like /(.|a)b/. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/regex.c b/regex.c
index 2ebaa4c..39e65da 100644
--- a/regex.c
+++ b/regex.c
@@ -2381,21 +2381,7 @@ re_compile_pattern(pattern, size, bufp)
laststart++;
EXTRACT_NUMBER_AND_INCR(mcnt, laststart);
- if (mcnt == 4 && *laststart == anychar) {
- switch ((enum regexpcode)laststart[1]) {
- case jump_n:
- case finalize_jump:
- case maybe_finalize_jump:
- case jump:
- case jump_past_alt:
- case dummy_failure_jump:
- bufp->options |= RE_OPTIMIZE_ANCHOR;
- break;
- default:
- break;
- }
- }
- else if (*laststart == charset || *laststart == charset_not) {
+ if (*laststart == charset || *laststart == charset_not) {
p0 = laststart;
mcnt = *++p0;
p0 += mcnt+1;