зеркало из https://github.com/github/ruby.git
* re.c (reg_names_iter): specify capacify
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
2c1990a839
Коммит
a6c38cb4d3
|
@ -1,3 +1,7 @@
|
|||
Thu May 19 00:17:01 2016 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* re.c (reg_names_iter): specify capacify
|
||||
|
||||
Wed May 18 21:29:59 2016 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* thread.c (recursive_list_access): a object id may be a Bignum. so,
|
||||
|
|
3
re.c
3
re.c
|
@ -780,8 +780,9 @@ reg_names_iter(const OnigUChar *name, const OnigUChar *name_end,
|
|||
static VALUE
|
||||
rb_reg_names(VALUE re)
|
||||
{
|
||||
VALUE ary = rb_ary_new();
|
||||
VALUE ary;
|
||||
rb_reg_check(re);
|
||||
ary = rb_ary_new_capa(onig_number_of_names(RREGEXP_PTR(re)));
|
||||
onig_foreach_name(RREGEXP_PTR(re), reg_names_iter, (void*)ary);
|
||||
return ary;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче