diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | dir.c | 1 | ||||
-rw-r--r-- | lib/tmpdir.rb | 1 |
3 files changed, 9 insertions, 0 deletions
@@ -1,3 +1,10 @@ +Wed Jun 10 18:15:17 2009 NAKAMURA Usaku <usa@ruby-lang.org> + + * 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@segment7.net> * lib/rubygems*: Upgrade to RubyGems 1.3.4 r2223. @@ -816,6 +816,7 @@ dir_s_getwd(VALUE dir) rb_secure(4); path = my_getcwd(); cwd = rb_tainted_str_new2(path); + rb_enc_associate(cwd, rb_filesystem_encoding()); xfree(path); return cwd; diff --git a/lib/tmpdir.rb b/lib/tmpdir.rb index 9fd36039d7..0d247bdd54 100644 --- a/lib/tmpdir.rb +++ b/lib/tmpdir.rb @@ -27,6 +27,7 @@ class Dir 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 |