mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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/trunk@33525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
49f6242b34
commit
cba2e89cdc
3 changed files with 18 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue