Skip to content

Commit

Permalink
Use mrb_true_or_false_value() / in obj_is_instance_of().
Browse files Browse the repository at this point in the history
  • Loading branch information
monaka committed Mar 19, 2013
1 parent 57e345c commit af1ead1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/kernel.c
Expand Up @@ -543,14 +543,12 @@ static mrb_value
obj_is_instance_of(mrb_state *mrb, mrb_value self)
{
mrb_value arg;
mrb_bool instance_of_p;

mrb_get_args(mrb, "o", &arg);
if (mrb_obj_is_instance_of(mrb, self, mrb_class_ptr(arg))){
return mrb_true_value();
}
else {
return mrb_false_value();
}
instance_of_p = mrb_obj_is_instance_of(mrb, self, mrb_class_ptr(arg));

return mrb_true_or_false_value(instance_of_p);
}

static void
Expand Down

0 comments on commit af1ead1

Please sign in to comment.