Skip to content

Commit

Permalink
Use mrb_true_or_false_value() / in sym_equal().
Browse files Browse the repository at this point in the history
  • Loading branch information
monaka committed Mar 19, 2013
1 parent 68652da commit 6ab9c38
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,12 @@ static mrb_value
sym_equal(mrb_state *mrb, mrb_value sym1)
{
mrb_value sym2;
mrb_bool equal_p;

mrb_get_args(mrb, "o", &sym2);
if (mrb_obj_equal(mrb, sym1, sym2)) return mrb_true_value();
return mrb_false_value();
equal_p = mrb_obj_equal(mrb, sym1, sym2);

return mrb_true_or_false_value(equal_p);
}

/* 15.2.11.3.2 */
Expand Down

0 comments on commit 6ab9c38

Please sign in to comment.