From 1ef1a0c6024daee5278885cd75dbe445299ebd7c Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 28 Feb 2015 06:02:06 +0000 Subject: 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 --- test/ruby/test_module.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index f2694d7b35..d014e8cb05 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -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 -- cgit v1.2.3