summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bignum.c b/bignum.c
index 9c289f7a8e..65e82d4e0f 100644
--- a/bignum.c
+++ b/bignum.c
@@ -3108,9 +3108,9 @@ static inline VALUE
bit_coerce(VALUE x)
{
while (!FIXNUM_P(x) && TYPE(x) != T_BIGNUM) {
- if (TYPE(x) == T_FLOAT) {
- rb_raise(rb_eTypeError, "can't convert Float into Integer");
- }
+ rb_raise(rb_eTypeError,
+ "can't convert %s into Integer for bitwise arithmetic",
+ rb_obj_classname(x));
x = rb_to_int(x);
}
return x;