From 813f3585690a4dcdb87f3e4e031ef4b284762dbb Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 29 Sep 2011 18:18:03 +0000 Subject: * array.c (ary_join_1): should not copy the encoding of non-string element after string element. [ruby-core:39776] [Bug #5379] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_array.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index 64524768e1..8d25e85d62 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -926,6 +926,8 @@ class TestArray < Test::Unit::TestCase assert_equal(Encoding::US_ASCII, [1, [u]].join.encoding) assert_equal(Encoding::UTF_8, [u, [e]].join.encoding) assert_equal(Encoding::UTF_8, [u, [1]].join.encoding) + bug5379 = '[ruby-core:39776]' + assert_equal(Encoding::UTF_8, [[], u, nil].join.encoding, bug5379) ensure $, = nil end -- cgit v1.2.3