summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-07 09:16:21 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-07 09:16:21 +0000
commitea7ce3096eb4143564ddff0ade2b67a00cde0b85 (patch)
tree70d0a8228241c254b43359fea7bb0b47b03d8159 /numeric.c
parent3acff92b2b21b2b719e070d25bb573ee87b9726f (diff)
downloadruby-ea7ce3096eb4143564ddff0ade2b67a00cde0b85.tar.gz
* numeric.c (bit_coerce): remove constant parameter `err'
(always TRUE) of bit_coerce(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/numeric.c b/numeric.c
index 34abd1d90c..86de28eb6c 100644
--- a/numeric.c
+++ b/numeric.c
@@ -3407,13 +3407,12 @@ fix_rev(VALUE num)
}
static int
-bit_coerce(VALUE *x, VALUE *y, int err)
+bit_coerce(VALUE *x, VALUE *y)
{
if (!FIXNUM_P(*y) && !RB_TYPE_P(*y, T_BIGNUM)) {
- do_coerce(x, y, err);
+ do_coerce(x, y, TRUE);
if (!FIXNUM_P(*x) && !RB_TYPE_P(*x, T_BIGNUM)
&& !FIXNUM_P(*y) && !RB_TYPE_P(*y, T_BIGNUM)) {
- if (!err) return FALSE;
coerce_failed(*x, *y);
}
}
@@ -3423,7 +3422,7 @@ bit_coerce(VALUE *x, VALUE *y, int err)
VALUE
rb_num_coerce_bit(VALUE x, VALUE y, ID func)
{
- bit_coerce(&x, &y, TRUE);
+ bit_coerce(&x, &y);
return rb_funcall(x, func, 1, y);
}
@@ -3446,7 +3445,7 @@ fix_and(VALUE x, VALUE y)
return rb_big_and(y, x);
}
- bit_coerce(&x, &y, TRUE);
+ bit_coerce(&x, &y);
return rb_funcall(x, rb_intern("&"), 1, y);
}
@@ -3469,7 +3468,7 @@ fix_or(VALUE x, VALUE y)
return rb_big_or(y, x);
}
- bit_coerce(&x, &y, TRUE);
+ bit_coerce(&x, &y);
return rb_funcall(x, rb_intern("|"), 1, y);
}
@@ -3492,7 +3491,7 @@ fix_xor(VALUE x, VALUE y)
return rb_big_xor(y, x);
}
- bit_coerce(&x, &y, TRUE);
+ bit_coerce(&x, &y);
return rb_funcall(x, rb_intern("^"), 1, y);
}