mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
object.c (mrb_eql): avoid mrb_funcall_argv() when possible
This commit is contained in:
@@ -646,5 +646,6 @@ MRB_API mrb_bool
|
||||
mrb_eql(mrb_state *mrb, mrb_value obj1, mrb_value obj2)
|
||||
{
|
||||
if (mrb_obj_eq(mrb, obj1, obj2)) return TRUE;
|
||||
if (mrb_class(mrb, obj1) != mrb_class(mrb, obj2)) return FALSE;
|
||||
return mrb_test(mrb_funcall_argv(mrb, obj1, MRB_SYM_Q(eql), 1, &obj2));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user