diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-01 09:41:08 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-01 09:41:08 +0000 |
commit | b1bcb8265d7a06efeb876a9d70997ff50e90296d (patch) | |
tree | 92ae4e5642445d76568b1cadbfb2aa7bd821b9ed /test | |
parent | ffdaca1d748804f2b5ca2de612f17cf6c78d351b (diff) |
merge revision(s) r33525: [Backport #6104]
* file.c (rb_file_join): honor input encodings than ASCII-8BIT.
[ruby-core:40338] [Bug #5483]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_path.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_path.rb b/test/ruby/test_path.rb index 74d568ae49..2db7be0b76 100644 --- a/test/ruby/test_path.rb +++ b/test/ruby/test_path.rb @@ -247,4 +247,13 @@ class TestPath < Test::Unit::TestCase assert_raise(Encoding::CompatibilityError) {open(s.encode("utf-32be"))} assert_raise(Encoding::CompatibilityError) {open(s.encode("utf-32le"))} end + + def test_join + bug5483 = '[ruby-core:40338]' + path = %w[a b] + Encoding.list.each do |e| + next unless e.ascii_compatible? + assert_equal(e, File.join(*path.map {|s| s.force_encoding(e)}).encoding, bug5483) + end + end end |