ruby-changes:37615
From: nobu <ko1@a...>
Date: Mon, 23 Feb 2015 15:27:16 +0900 (JST)
Subject: [ruby-changes:37615] nobu:r49696 (trunk): string.c: raise a RegexpError
nobu 2015-02-23 15:26:59 +0900 (Mon, 23 Feb 2015) New Revision: 49696 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49696 Log: string.c: raise a RegexpError * string.c (get_pat_quoted): simply raise a RegexpError, TypeError is never raised. Modified files: trunk/string.c Index: string.c =================================================================== --- string.c (revision 49695) +++ string.c (revision 49696) @@ -4055,7 +4055,7 @@ get_pat_quoted(VALUE pat, int check) https://github.com/ruby/ruby/blob/trunk/string.c#L4055 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; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/