From c512cfdb1f108c48dc599a91ab8de7ec5da58660 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 5 Feb 2014 06:23:37 +0000 Subject: 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 --- dir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dir.c b/dir.c index 3e2ddbd18e..4f62cb2125 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; -- cgit v1.2.3