summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-16 04:49:25 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-16 04:49:25 +0000
commitaabb7851972e36291ca53551815a3b7f3dea046e (patch)
tree7f260c61f74ab99f7c1eff6c87fd9d41915c91b0 /regex.c
parent2403ad9e7de8976a83798f9d86f82f3b5ae0d2cd (diff)
* regex.c (calculate_must_string): should handle option_set
properly. [ruby-talk:73481] * regex.c (re_compile_fastmap): a bug in flag manipulation. [ruby-talk:73549] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/regex.c b/regex.c
index 57ce31fe33..4ac18cb3a0 100644
--- a/regex.c
+++ b/regex.c
@@ -1037,6 +1037,7 @@ calculate_must_string(start, end)
break;
case duplicate:
+ case option_set:
p++;
break;
@@ -1062,7 +1063,6 @@ calculate_must_string(start, end)
case push_dummy_failure:
case start_paren:
case stop_paren:
- case option_set:
break;
case charset:
@@ -2815,8 +2815,11 @@ re_compile_fastmap(bufp)
case casefold_on:
bufp->options |= RE_MAY_IGNORECASE;
+ options |= RE_OPTION_IGNORECASE;
+ continue;
+
case casefold_off:
- options ^= RE_OPTION_IGNORECASE;
+ options &= ~RE_OPTION_IGNORECASE;
continue;
case option_set: