summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-28 03:28:50 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-28 03:28:50 (GMT)
commitda70f4d02a5251605bc6a44940a7784f9f613fcb (patch)
tree1adb8feeb797b350a31e8ff5c005a3cd836e2d34 /class.c
parentc70572d5a8413f4c06977bf134a4cbef0d6789cf (diff)
class.c: preserve encoding
* class.c (rb_check_inheritable): preserve encoding in an error message when the superclass is not a class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r--class.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/class.c b/class.c
index 991172a..6ee1e08 100644
--- a/class.c
+++ b/class.c
@@ -214,8 +214,8 @@ void
rb_check_inheritable(VALUE super)
{
if (!RB_TYPE_P(super, T_CLASS)) {
- rb_raise(rb_eTypeError, "superclass must be a Class (%s given)",
- rb_obj_classname(super));
+ rb_raise(rb_eTypeError, "superclass must be a Class (%"PRIsVALUE" given)",
+ rb_obj_class(super));
}
if (RBASIC(super)->flags & FL_SINGLETON) {
rb_raise(rb_eTypeError, "can't make subclass of singleton class");