From 0ada28f906097f5ba370575a86aef1e42a9d7ba0 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 4 Dec 2015 02:22:44 +0000 Subject: thread.c: name must be ascii-compatible * thread.c (rb_thread_setname): name must be ascii-compatible, as pthread APIs do not accept legacy wide char strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_thread.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test/ruby/test_thread.rb') diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index 0affca294a..516014ac25 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -1067,6 +1067,7 @@ q.pop bug11756 = '[ruby-core:71774] [Bug #11756]' t = Thread.start {} assert_raise(ArgumentError, bug11756) {t.name = "foo\0bar"} + assert_raise(ArgumentError, bug11756) {t.name = "foo".encode(Encoding::UTF_32BE)} ensure t.kill t.join -- cgit v1.2.3