mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 09:04:05 +02:00
merge revision(s) 33991:
* file.c (file_path_convert): don't convert it when the path string is ascii only. [ruby-core:41556] [Bug #5733] tests are contributed by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@36735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b800677425
commit
f869ed2ff3
4 changed files with 32 additions and 4 deletions
4
file.c
4
file.c
|
@ -138,8 +138,10 @@ file_path_convert(VALUE name)
|
|||
if (rb_default_internal_encoding() != NULL
|
||||
&& rb_usascii_encoding() != fname_encoding
|
||||
&& rb_ascii8bit_encoding() != fname_encoding
|
||||
&& (fs_encoding = rb_filesystem_encoding()) != fname_encoding) {
|
||||
&& (fs_encoding = rb_filesystem_encoding()) != fname_encoding
|
||||
&& !rb_enc_str_asciionly_p(name)) {
|
||||
/* Don't call rb_filesystem_encoding() before US-ASCII and ASCII-8BIT */
|
||||
/* fs_encoding should be ascii compatible */
|
||||
name = rb_str_conv_enc(name, fname_encoding, fs_encoding);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue