bug(presym): Fix mrb_cmp declaration of <=> symbol for funcall

This commit is contained in:
Ryan Lopopolo
2021-03-07 21:26:15 -08:00
parent 0f45836b59
commit b199f6fc5a
+1 -1
View File
@@ -1578,7 +1578,7 @@ mrb_cmp(mrb_state *mrb, mrb_value obj1, mrb_value obj2)
return -2;
return mrb_str_cmp(mrb, obj1, obj2);
default:
v = mrb_funcall_id(mrb, obj1, MRB_SYM(cmp), 1, obj2);
v = mrb_funcall_id(mrb, obj1, MRB_OPSYM(cmp), 1, obj2);
if (mrb_nil_p(v) || !mrb_integer_p(v))
return -2;
return mrb_integer(v);