ruby-changes:64766
From: Kenta <ko1@a...>
Date: Wed, 6 Jan 2021 13:42:46 +0900 (JST)
Subject: [ruby-changes:64766] 7da06c04b2 (master): Need to convert the return value of rb_big_cmp
https://git.ruby-lang.org/ruby.git/commit/?id=7da06c04b2 From 7da06c04b21304e8b96089c74ea9aa49ea985e65 Mon Sep 17 00:00:00 2001 From: Kenta Murata <mrkn@m...> Date: Wed, 6 Jan 2021 13:39:09 +0900 Subject: Need to convert the return value of rb_big_cmp diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index a912908..7f671f1 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -2766,7 +2766,7 @@ rb_big_convert_to_BigDecimal(VALUE val, RB_UNUSED_VAR(size_t digs), int raise_ex https://github.com/ruby/ruby/blob/trunk/ext/bigdecimal/bigdecimal.c#L2766 assert(RB_TYPE_P(val, T_BIGNUM)); size_t size = rb_absint_size(val, NULL); - int sign = rb_big_cmp(val, INT2FIX(0)); + int sign = FIX2INT(rb_big_cmp(val, INT2FIX(0))); if (size <= sizeof(long)) { if (sign < 0) { return rb_int64_convert_to_BigDecimal(NUM2LONG(val), digs, raise_exception); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/