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:
parent
a10fdc9270
commit
4f3217e326
2
string.c
2
string.c
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user