diff --git a/array.c b/array.c index da94b3a100..c0f6dd8cb6 100644 --- a/array.c +++ b/array.c @@ -3050,8 +3050,8 @@ take_items(VALUE obj, long n) result = rb_ary_new2(n); args[0] = result; args[1] = (VALUE)n; if (rb_check_block_call(obj, idEach, 0, 0, take_i, (VALUE)args) == Qundef) - rb_raise(rb_eTypeError, "wrong argument type %s (must respond to :each)", - rb_obj_classname(obj)); + rb_raise(rb_eTypeError, "wrong argument type %"PRIsVALUE" (must respond to :each)", + rb_obj_class(obj)); return result; }