summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-26 07:00:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-26 07:00:02 +0000
commit2c23bf741f6cde803c5232c02fd4f79ef51dc5b1 (patch)
tree1d00ca05cfd63bb6bfacd64b2ada05dc7ebac7e5 /test
parentfe8a3074f9df1c7aa03d552c6d022956690141a2 (diff)
thread.c: preserve encoding
* thread.c (rb_thread_inspect): preserve encoding of the class name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_thread.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index b61e90166f..213b1f908e 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -27,6 +27,13 @@ class TestThread < Test::Unit::TestCase
end
end
+ def test_inspect
+ th = Module.new {break module_eval("class C\u{30b9 30ec 30c3 30c9} < Thread; self; end")}.start{}
+ assert_match(/::C\u{30b9 30ec 30c3 30c9}:/, th.inspect)
+ ensure
+ th.join
+ end
+
def test_main_thread_variable_in_enumerator
assert_equal Thread.main, Thread.current