summaryrefslogtreecommitdiff
path: root/enumerator.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-28 02:40:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-28 02:40:46 +0000
commit4191a6b90d3eeb63a31609dba29a1904efee3738 (patch)
tree6689e8d252ca17f1f90626d7ade4b144dbfccdd7 /enumerator.c
parent7d49923e9e9a9d1a01f3183fd798258e9d289da0 (diff)
preserve encodings in error messages
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enumerator.c')
-rw-r--r--enumerator.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/enumerator.c b/enumerator.c
index 7f91f32..092e950 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);