insns.def: preserve encoding
* insns.def (defineclass): preserve encoding of name in error messages for super class mismatch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b90a5f9334
commit
548b97e70c
@ -1,4 +1,7 @@
|
|||||||
Mon Jun 29 02:08:01 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Mon Jun 29 02:10:10 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* insns.def (defineclass): preserve encoding of name in error
|
||||||
|
messages for super class mismatch.
|
||||||
|
|
||||||
* insns.def (defineclass): preserve encoding of name in error
|
* insns.def (defineclass): preserve encoding of name in error
|
||||||
messages for non-class super.
|
messages for non-class super.
|
||||||
|
@ -869,8 +869,8 @@ defineclass
|
|||||||
tmp = rb_class_real(RCLASS_SUPER(klass));
|
tmp = rb_class_real(RCLASS_SUPER(klass));
|
||||||
|
|
||||||
if (tmp != super) {
|
if (tmp != super) {
|
||||||
rb_raise(rb_eTypeError, "superclass mismatch for class %s",
|
rb_raise(rb_eTypeError, "superclass mismatch for class % "PRIsVALUE"",
|
||||||
rb_id2name(id));
|
rb_id2str(id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -369,6 +369,9 @@ class TestClass < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
}
|
}
|
||||||
|
assert_raise_with_message(TypeError, /#{n}/) {
|
||||||
|
m.module_eval "class #{n} < Class.new; end"
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_cloned_singleton_method_added
|
def test_cloned_singleton_method_added
|
||||||
|
Loading…
x
Reference in New Issue
Block a user