1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Use RTEST to check truthy

This commit is contained in:
Takashi Kokubun 2015-11-28 11:29:31 +09:00
parent 1cbf0cd40f
commit 7a9fc74262

View file

@ -38,7 +38,7 @@ attr_build_id(VALUE escape_attrs, VALUE ids)
truthy_ids = rb_ary_new2(len); truthy_ids = rb_ary_new2(len);
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
id = rb_ary_entry(ids, i); id = rb_ary_entry(ids, i);
if (!NIL_P(id) && id != Qfalse) { if (RTEST(id)) {
rb_ary_push(truthy_ids, id); rb_ary_push(truthy_ids, id);
} }
} }