From 4f3217e326c293d5162fb200cc7334e15c3872c5 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 23 Feb 2015 06:26:59 +0000 Subject: [PATCH] string.c: raise a RegexpError * string.c (get_pat_quoted): simply raise a RegexpError, TypeError is never raised. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }