variable.c: preserve name encoding of subclass

* variable.c (rb_tmp_class_path): preserve name encoding of an
  anonymous instance of module/class subclass.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-02-28 06:02:06 +00:00
parent 0066608c13
commit 1ef1a0c602
3 changed files with 12 additions and 7 deletions

View file

@ -1087,6 +1087,8 @@ class TestModule < Test::Unit::TestCase
assert_equal("C\u{df}", c.name, '[ruby-core:24600]')
c = eval("class C\u{df}; self; end")
assert_equal("TestModule::C\u{df}", c.name, '[ruby-core:24600]')
c = Module.new.module_eval("class X\u{df} < Module; self; end")
assert_match(/::X\u{df}:/, c.new.to_s)
end
def test_method_added