aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 3070cbff03..51751f89b7 100644
--- a/string.c
+++ b/string.c
@@ -5647,7 +5647,7 @@ check_case_options(int argc, VALUE *argv, OnigCaseFoldType flags)
flags |= ONIGENC_CASE_ASCII_ONLY;
else if (argv[0]==sym_fold) {
if ((flags & (ONIGENC_CASE_UPCASE|ONIGENC_CASE_DOWNCASE)) == ONIGENC_CASE_DOWNCASE)
- flags |= ONIGENC_CASE_FOLD;
+ flags ^= ONIGENC_CASE_FOLD|ONIGENC_CASE_DOWNCASE;
else
rb_raise(rb_eArgError, "option :fold only allowed for downcasing");
}