From 4191a6b90d3eeb63a31609dba29a1904efee3738 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 28 Sep 2015 02:40:46 +0000 Subject: preserve encodings in error messages git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- enumerator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'enumerator.c') diff --git a/enumerator.c b/enumerator.c index 7f91f32062..092e950ec5 100644 --- a/enumerator.c +++ b/enumerator.c @@ -1245,8 +1245,8 @@ generator_initialize(int argc, VALUE *argv, VALUE obj) if (!rb_obj_is_proc(proc)) rb_raise(rb_eTypeError, - "wrong argument type %s (expected Proc)", - rb_obj_classname(proc)); + "wrong argument type %"PRIsVALUE" (expected Proc)", + rb_obj_class(proc)); if (rb_block_given_p()) { rb_warn("given block not used"); @@ -1771,8 +1771,8 @@ lazy_zip(int argc, VALUE *argv, VALUE obj) if (NIL_P(v)) { for (; i < argc; i++) { if (!rb_respond_to(argv[i], id_each)) { - rb_raise(rb_eTypeError, "wrong argument type %s (must respond to :each)", - rb_obj_classname(argv[i])); + rb_raise(rb_eTypeError, "wrong argument type %"PRIsVALUE" (must respond to :each)", + rb_obj_class(argv[i])); } } ary = rb_ary_new4(argc, argv); -- cgit v1.2.3