summaryrefslogtreecommitdiffstats
path: root/test/ruby/test_module.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-30 07:45:42 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-30 07:45:42 +0000
commit1ef67e7146a4a11259900c16746d3c8db9637e52 (patch)
treef959c46536a279ad5306a5ecc8a78b7710a81b15 /test/ruby/test_module.rb
parent6410694b3783276b964e220d6db1a8c88312585a (diff)
downloadruby-1ef67e7146a4a11259900c16746d3c8db9637e52.tar.gz
ruby-1ef67e7146a4a11259900c16746d3c8db9637e52.tar.xz
ruby-1ef67e7146a4a11259900c16746d3c8db9637e52.zip
* insns.def (defineclass): preserve encoding of class/module
names. [ruby-core:24600] * variable.c (rb_set_class_path_string): set class path with a string value. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r--test/ruby/test_module.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 066dd8601..4611abfbf 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -741,4 +741,12 @@ class TestModule < Test::Unit::TestCase
assert_equal(:bClass2, b.__send__(:bClass2))
assert_equal(:bClass3, b.__send__(:bClass3))
end
+
+
+ def test_nonascii_name
+ c = eval("class ::C\u{df}; self; end")
+ 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]')
+ end
end