summaryrefslogtreecommitdiff
path: root/sprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sprintf.c')
-rw-r--r--sprintf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sprintf.c b/sprintf.c
index 7fbfe1b391..f9b3d568e4 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -658,11 +658,11 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
}
else {
volatile VALUE tmp1;
- if (!RBIGNUM(val)->sign) {
+ if (!RBIGNUM_SIGN(val)) {
val = rb_big_clone(val);
rb_big_2comp(val);
}
- tmp1 = tmp = rb_big2str0(val, base, RBIGNUM(val)->sign);
+ tmp1 = tmp = rb_big2str0(val, base, RBIGNUM_SIGN(val));
s = RSTRING_PTR(tmp);
if (*s == '-') {
if (base == 10) {
@@ -729,7 +729,7 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
else {
char c;
- if (!sign && bignum && !RBIGNUM(val)->sign)
+ if (!sign && bignum && !RBIGNUM_SIGN(val))
c = sign_bits(base, p);
else
c = '0';