numeric.c (mrb_cmp): should not raise NoMethodError.
Even when `obj1` does not have `<=>` method.
MODIFY
src/numeric.c
src/numeric.c
@@ -1929,6 +1929,7 @@ mrb_cmp(mrb_state *mrb, mrb_value obj1, mrb_value obj2)
return -2;
return mrb_str_cmp(mrb, obj1, obj2);
default:
+ if (!mrb_respond_to(mrb, obj1, MRB_OPSYM(cmp))) return -2;
v = mrb_funcall_id(mrb, obj1, MRB_OPSYM(cmp), 1, obj2);
if (mrb_nil_p(v) || !mrb_integer_p(v))
return -2;

numeric.c (mrb_cmp): should not raise NoMethodError.

Even when `obj1` does not have `<=>` method.