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
This commit is contained in:
nobu 2015-02-23 06:26:59 +00:00
parent a10fdc9270
commit 4f3217e326

View File

@ -4055,7 +4055,7 @@ get_pat_quoted(VALUE pat, int check)
pat = val; pat = val;
} }
if (check && is_broken_string(pat)) { 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; return pat;
} }