mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* dir.c (GlobPathValue), file.c (rb_get_path_check): path names
must be ASCII compatible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bdde51172c
commit
a1485dbea0
5 changed files with 29 additions and 1 deletions
|
@ -161,6 +161,11 @@ class TestDir < Test::Unit::TestCase
|
|||
Dir.glob(File.join(@root, '{\{\},a}')))
|
||||
assert_equal([], Dir.glob(File.join(@root, '[')))
|
||||
assert_equal([], Dir.glob(File.join(@root, '[a-\\')))
|
||||
|
||||
d = "\u{3042}\u{3044}".encode("utf-16le")
|
||||
assert_raise(Encoding::CompatibilityError) {Dir.glob(d)}
|
||||
m = Class.new {define_method(:to_path) {d}}
|
||||
assert_raise(Encoding::CompatibilityError) {Dir.glob(m.new)}
|
||||
end
|
||||
|
||||
def test_foreach
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue