Commit 57469584 authored by Rory OConnell's avatar Rory OConnell

fix object_id of true, false, and undef all 0

parent 97319697
...@@ -107,10 +107,11 @@ mrb_obj_id(mrb_value obj) ...@@ -107,10 +107,11 @@ mrb_obj_id(mrb_value obj)
return MakeID(0); /* not define */ return MakeID(0); /* not define */
case MRB_TT_FALSE: case MRB_TT_FALSE:
if (mrb_nil_p(obj)) if (mrb_nil_p(obj))
return MakeID(1); return MakeID(4);
return MakeID(0); else
return MakeID(0);
case MRB_TT_TRUE: case MRB_TT_TRUE:
return MakeID(1); return MakeID(2);
case MRB_TT_SYMBOL: case MRB_TT_SYMBOL:
return MakeID(mrb_symbol(obj)); return MakeID(mrb_symbol(obj));
case MRB_TT_FIXNUM: case MRB_TT_FIXNUM:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment