[前][次][番号順一覧][スレッド一覧]

ruby-changes:32755

From: nobu <ko1@a...>
Date: Wed, 5 Feb 2014 15:23:44 +0900 (JST)
Subject: [ruby-changes:32755] nobu:r44834 (trunk): dir.c: fallback to ASCII-8BIT

nobu	2014-02-05 15:23:37 +0900 (Wed, 05 Feb 2014)

  New Revision: 44834

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44834

  Log:
    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.

  Modified files:
    trunk/dir.c
Index: dir.c
===================================================================
--- dir.c	(revision 44833)
+++ dir.c	(revision 44834)
@@ -1748,6 +1748,7 @@ push_glob(VALUE ary, VALUE str, int flag https://github.com/ruby/ruby/blob/trunk/dir.c#L1748
     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;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]