mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Allocate array buffer beforehand
This commit is contained in:
parent
2e30013205
commit
0420970001
1 changed files with 1 additions and 1 deletions
|
@ -13,8 +13,8 @@ attr_build_id(VALUE escape_attrs, VALUE ids)
|
|||
|
||||
ids = rb_funcall(ids, id_flatten, 0);
|
||||
|
||||
truthy_ids = rb_ary_new();
|
||||
len = RARRAY_LEN(ids);
|
||||
truthy_ids = rb_ary_new2(len);
|
||||
for (i = 0; i < len; i++) {
|
||||
id = rb_ary_entry(ids, i);
|
||||
if (!NIL_P(id) && id != Qfalse) {
|
||||
|
|
Loading…
Reference in a new issue