Use value.i for nil/false check.

This commit is contained in:
Masaki Muranaka
2012-06-07 09:34:27 +09:00
parent 4c01f002fd
commit e0909fef44
+1 -1
View File
@@ -28,7 +28,7 @@ mrb_class(mrb_state *mrb, mrb_value v)
{
switch (mrb_type(v)) {
case MRB_TT_FALSE:
if (v.value.p)
if (v.value.i)
return mrb->false_class;
return mrb->nil_class;
case MRB_TT_TRUE: