summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-21 09:14:14 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-21 09:14:14 +0000
commita67937fb346f84e449d3cffe9ce2fc4236f93e2f (patch)
tree9b79d3f0315ba647bab513ed134436411b32ca8a
parente8508858a4eba91f50cffa6029580ebf6ddb1356 (diff)
downloadruby-a67937fb346f84e449d3cffe9ce2fc4236f93e2f.tar.gz
ruby-a67937fb346f84e449d3cffe9ce2fc4236f93e2f.tar.xz
ruby-a67937fb346f84e449d3cffe9ce2fc4236f93e2f.zip
merges r23661 from trunk into ruby_1_9_1.
-- * 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@23781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--dir.c1
-rw-r--r--lib/tmpdir.rb1
-rw-r--r--version.h2
4 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e4ae5afbd..a1b4bf4ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.)
+
Tue Jun 9 22:38:09 2009 Tadayoshi Funaba <tadf@dotrb.org>
* lib/cmath.rb (log10): raised exception when the given number is
diff --git a/dir.c b/dir.c
index 5a46f1bfc..a79d8e5b2 100644
--- a/dir.c
+++ b/dir.c
@@ -802,6 +802,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 bcd66ab42..28b15d651 100644
--- a/lib/tmpdir.rb
+++ b/lib/tmpdir.rb
@@ -28,6 +28,7 @@ class Dir
len = getdir.call(windir, windir.size)
windir = File.expand_path(windir[0, len])
end
+ windir.force_encoding(Dir.pwd.encoding)
temp = File.join(windir.untaint, 'temp')
@@systmpdir = temp if File.directory?(temp) and File.writable?(temp)
rescue LoadError
diff --git a/version.h b/version.h
index 4ce732b55..249ec1350 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "1.9.1"
#define RUBY_RELEASE_DATE "2009-05-22"
-#define RUBY_PATCHLEVEL 171
+#define RUBY_PATCHLEVEL 172
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1