diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-04 01:10:00 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-04 01:10:00 +0000 |
commit | c604000a311e7379b487f581a53f7c950105224a (patch) | |
tree | 814ed47a1242e25cae615df328caa352c9e32c59 /dir.c | |
parent | 8bcf81886fb198f98fd5b7433b05810fe8d0530a (diff) | |
download | ruby-c604000a311e7379b487f581a53f7c950105224a.tar.gz |
dir.c: normalize cwd
* dir.c (rb_dir_getwd): normalize OS path to UTF-8 on OS X.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1012,7 +1012,12 @@ rb_dir_getwd(void) VALUE cwd; path = my_getcwd(); +#ifdef __APPLE__ + cwd = rb_str_normalize_ospath(path, strlen(path)); + OBJ_TAINT(cwd); +#else cwd = rb_tainted_str_new2(path); +#endif rb_enc_associate(cwd, rb_filesystem_encoding()); xfree(path); |