summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
Diffstat (limited to 're.c')
-rw-r--r--re.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/re.c b/re.c
index 4ecc46eee5..ac73732d39 100644
--- a/re.c
+++ b/re.c
@@ -964,7 +964,7 @@ rb_reg_s_quote(argc, argv)
if (*s == '[' || *s == ']'
|| *s == '{' || *s == '}'
|| *s == '(' || *s == ')'
- || *s == '|'
+ || *s == '|' || *s == '-'
|| *s == '*' || *s == '.' || *s == '\\'
|| *s == '?' || *s == '+'
|| *s == '^' || *s == '$') {