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

ruby-changes:11997

From: usa <ko1@a...>
Date: Wed, 10 Jun 2009 18:16:14 +0900 (JST)
Subject: [ruby-changes:11997] Ruby:r23661 (trunk): * dir.c (dir_s_getwd): directory path's encoding should be filesystem's

usa	2009-06-10 18:15:55 +0900 (Wed, 10 Jun 2009)

  New Revision: 23661

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

  Log:
    * dir.c (dir_s_getwd): directory path's encoding should be filesystem's
      one.
    * lib/tmpdir.rb: ditto (but not finished yet.)

  Modified files:
    trunk/ChangeLog
    trunk/dir.c
    trunk/lib/tmpdir.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 23660)
+++ ChangeLog	(revision 23661)
@@ -1,3 +1,10 @@
+Wed Jun 10 18:15:17 2009  NAKAMURA Usaku  <usa@r...>
+
+	* dir.c (dir_s_getwd): directory path's encoding should be filesystem's
+	  one.
+
+	* lib/tmpdir.rb: ditto (but not finished yet.)
+
 Wed Jun 10 06:28:15 2009  Eric Hodel  <drbrain@s...>
 
 	* lib/rubygems*: Upgrade to RubyGems 1.3.4 r2223.
Index: lib/tmpdir.rb
===================================================================
--- lib/tmpdir.rb	(revision 23660)
+++ lib/tmpdir.rb	(revision 23661)
@@ -27,6 +27,7 @@
       end
       windir[getdir.call(windir, windir.size)..-1] = ""
     end
+    windir.force_encoding(Dir.pwd.encoding)
     temp = File.expand_path('temp', windir.untaint)
     @@systmpdir = temp if File.directory?(temp) and File.writable?(temp)
   rescue LoadError
Index: dir.c
===================================================================
--- dir.c	(revision 23660)
+++ dir.c	(revision 23661)
@@ -816,6 +816,7 @@
     rb_secure(4);
     path = my_getcwd();
     cwd = rb_tainted_str_new2(path);
+    rb_enc_associate(cwd, rb_filesystem_encoding());
 
     xfree(path);
     return cwd;

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

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