summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-05 06:23:37 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-05 06:23:37 (GMT)
commitc512cfdb1f108c48dc599a91ab8de7ec5da58660 (patch)
tree2a2a867b40c37a395e12ead96661d9fb5d578286 /dir.c
parentae411fb558b0444404097e19bbe94457056a2118 (diff)
dir.c: fallback to ASCII-8BIT
* dir.c (push_glob): fallback to ASCII-8BIT for the case non-ascii path name exists. failed with LANG=C, on MacOS X which has a localized symlink on the root directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/dir.c b/dir.c
index 3e2ddbd..4f62cb2 100644
--- a/dir.c
+++ b/dir.c
@@ -1748,6 +1748,7 @@ push_glob(VALUE ary, VALUE str, int flags)
rb_encoding *enc = rb_enc_get(str);
if (enc == rb_usascii_encoding()) enc = rb_filesystem_encoding();
+ if (enc == rb_usascii_encoding()) enc = rb_ascii8bit_encoding();
args.func = push_pattern;
args.value = ary;
args.enc = enc;