mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* dir.c (dir_s_getwd): directory path's encoding should be filesystem's
one. * lib/tmpdir.rb: ditto (but not finished yet.) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b28d9b6d18
commit
a610b0a959
3 changed files with 9 additions and 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.
|
||||
|
|
1
dir.c
1
dir.c
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue