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 8b135a9636..e6e28d6838 100644
--- a/string.c
+++ b/string.c
@@ -4055,7 +4055,7 @@ get_pat_quoted(VALUE pat, int check)
pat = val;
}
if (check && is_broken_string(pat)) {
- rb_raise(rb_eTypeError, "%"PRIsVALUE, rb_reg_new_str(pat, 0));
+ rb_exc_raise(rb_reg_check_preprocess(pat));
}
return pat;
}