mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* re.c (rb_reg_s_alloc): avoid inifinte recursion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3358b44f6e
commit
85013a7915
1 changed files with 6 additions and 5 deletions
11
re.c
11
re.c
|
@ -1045,13 +1045,14 @@ static VALUE
|
|||
rb_reg_s_alloc(klass)
|
||||
VALUE klass;
|
||||
{
|
||||
VALUE re = rb_obj_alloc(klass);
|
||||
NEWOBJ(re, struct RRegexp);
|
||||
OBJSETUP(re, klass, T_REGEXP);
|
||||
|
||||
RREGEXP(re)->ptr = 0;
|
||||
RREGEXP(re)->len = 0;
|
||||
RREGEXP(re)->str = 0;
|
||||
re->ptr = 0;
|
||||
re->len = 0;
|
||||
re->str = 0;
|
||||
|
||||
return re;
|
||||
return (VALUE)re;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
|
|
Loading…
Reference in a new issue