1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* io.c (rb_scan_open_args): add UTF8-MAC to no-convertion encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2009-09-29 12:31:43 +00:00
parent 42f0ea8c61
commit ad8978fdb1
2 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,7 @@
Tue Sep 29 21:16:35 2009 NARUSE, Yui <naruse@ruby-lang.org>
* io.c (rb_scan_open_args): add UTF8-MAC to no-convertion encoding.
Tue Sep 29 21:21:15 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (--enable-pthread): deprecated.

8
io.c
View file

@ -5307,17 +5307,19 @@ rb_scan_open_args(int argc, VALUE *argv,
opt = pop_last_hash(&argc, argv);
rb_scan_args(argc, argv, "12", &fname, &vmode, &vperm);
FilePathValue(fname);
#if defined __APPLE__
#ifdef __APPLE__
{
static rb_encoding *fs_encoding;
static rb_encoding *utf8mac_encoding;
rb_encoding *fname_encoding = rb_enc_get(fname);
if (!fs_encoding)
fs_encoding = rb_filesystem_encoding();
if (!utf8mac_encoding)
utf8mac_encoding = rb_enc_find("UTF8-MAC");
if (rb_usascii_encoding() != fname_encoding
&& rb_ascii8bit_encoding() != fname_encoding
#if defined __APPLE__
&& rb_utf8_encoding() != fname_encoding
#endif
&& rb_utf8mac_encoding() != fname_encoding
&& fs_encoding != fname_encoding) {
static VALUE fs_enc;
if (!fs_enc)