From e9ac265c39c3a973f7ad55013188ac68804d3f90 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 28 Jun 2015 03:28:50 +0000 Subject: 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 --- class.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'class.c') diff --git a/class.c b/class.c index 991172acbb..6ee1e084d3 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"); -- cgit v1.2.3