file.c: OSX path encoding
* file.c (rb_str_encode_ospath): OS path encoding on Mac OS X is also fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7cb53ed363
commit
863989993a
@ -1,3 +1,8 @@
|
|||||||
|
Sun Aug 11 23:27:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* file.c (rb_str_encode_ospath): OS path encoding on Mac OS X is also
|
||||||
|
fixed.
|
||||||
|
|
||||||
Sun Aug 11 22:57:24 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sun Aug 11 22:57:24 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* test/ruby/test_require.rb (assert_require_nonascii_path): OS path
|
* test/ruby/test_require.rb (assert_require_nonascii_path): OS path
|
||||||
|
2
file.c
2
file.c
@ -239,6 +239,8 @@ rb_str_encode_ospath(VALUE path)
|
|||||||
if (enc != utf8) {
|
if (enc != utf8) {
|
||||||
path = rb_str_conv_enc(path, enc, utf8);
|
path = rb_str_conv_enc(path, enc, utf8);
|
||||||
}
|
}
|
||||||
|
#elif defined __APPLE__
|
||||||
|
path = rb_str_conv_enc(path, NULL, rb_utf8_encoding());
|
||||||
#endif
|
#endif
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ class TestRequire < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
case RUBY_PLATFORM
|
case RUBY_PLATFORM
|
||||||
when /cygwin/, /mswin/, /mingw/
|
when /cygwin/, /mswin/, /mingw/, /darwin/
|
||||||
def self.ospath_encoding(path)
|
def self.ospath_encoding(path)
|
||||||
Encoding::UTF_8
|
Encoding::UTF_8
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user