mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
numeric.c (cmpnum): support fixnum cmp bignum; fix #6163
This commit is contained in:
@@ -2025,6 +2025,9 @@ cmpnum(mrb_state *mrb, mrb_value v1, mrb_value v2)
|
||||
if (mrb_bigint_p(v1)) {
|
||||
return mrb_bint_cmp(mrb, v1, v2);
|
||||
}
|
||||
if (mrb_bigint_p(v2)) {
|
||||
return mrb_bint_cmp(mrb, mrb_bint_new_int(mrb, mrb_integer(v1)), v2);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MRB_NO_FLOAT
|
||||
|
||||
Reference in New Issue
Block a user