From 7a9fc74262eac4fb4d6bf235f8a0534131c2733f Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sat, 28 Nov 2015 11:29:31 +0900 Subject: [PATCH] Use RTEST to check truthy --- ext/hamlit/hamlit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/hamlit/hamlit.c b/ext/hamlit/hamlit.c index 65458e08..12519027 100644 --- a/ext/hamlit/hamlit.c +++ b/ext/hamlit/hamlit.c @@ -38,7 +38,7 @@ attr_build_id(VALUE escape_attrs, VALUE 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) { + if (RTEST(id)) { rb_ary_push(truthy_ids, id); } }