aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_thread.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-04 02:22:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-04 02:22:44 +0000
commit0ada28f906097f5ba370575a86aef1e42a9d7ba0 (patch)
treef8ead1284b2c53889ae186c7643c1cf8a48dcb8e /test/ruby/test_thread.rb
parentb887c7c20ab81b50ed7cb8c7db3218c443985d6b (diff)
downloadruby-0ada28f906097f5ba370575a86aef1e42a9d7ba0.tar.gz
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
Diffstat (limited to 'test/ruby/test_thread.rb')
-rw-r--r--test/ruby/test_thread.rb1
1 files changed, 1 insertions, 0 deletions
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