summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-25 18:44:22 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-25 18:44:22 (GMT)
commit606e855622c2694c6bf1a5cec59373bef0d0877e (patch)
tree48dd02c881d87e84e0e94aecfda1ee2628e7d152 /class.c
parentd0ac6d5879c8d2132a7419ff2b8a4fb3b3a28597 (diff)
rb_id2str over rb_id2name
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r--class.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/class.c b/class.c
index d9ce5b5..2869bf3 100644
--- a/class.c
+++ b/class.c
@@ -699,16 +699,16 @@ rb_define_class_id_under(VALUE outer, ID id, VALUE super)
if (rb_const_defined_at(outer, id)) {
klass = rb_const_get_at(outer, id);
if (!RB_TYPE_P(klass, T_CLASS)) {
- rb_raise(rb_eTypeError, "%s is not a class", rb_id2name(id));
+ rb_raise(rb_eTypeError, "%"PRIsVALUE" is not a class", rb_id2str(id));
}
if (rb_class_real(RCLASS_SUPER(klass)) != super) {
- rb_name_error(id, "%s is already defined", rb_id2name(id));
+ rb_name_error(id, "%"PRIsVALUE" is already defined", rb_id2str(id));
}
return klass;
}
if (!super) {
- rb_warn("no super class for `%s::%s', Object assumed",
- rb_class2name(outer), rb_id2name(id));
+ rb_warn("no super class for `%"PRIsVALUE"::%"PRIsVALUE"', Object assumed",
+ rb_class_path(outer), rb_id2str(id));
}
klass = rb_define_class_id(id, super);
rb_set_class_path_string(klass, outer, rb_id2str(id));