1
0
Fork 0
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:
nobu 2009-09-19 08:33:01 +00:00
parent bdde51172c
commit a1485dbea0
5 changed files with 29 additions and 1 deletions

View file

@ -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