ruby-changes:3061
From: ko1@a...
Date: 24 Dec 2007 04:29:12 +0900
Subject: [ruby-changes:3061] matz - Ruby:r14553 (trunk): * io.c (io_enc_str): should preserve default_external encoding.
matz 2007-12-24 04:29:01 +0900 (Mon, 24 Dec 2007)
New Revision: 14553
Modified files:
trunk/ChangeLog
trunk/io.c
Log:
* io.c (io_enc_str): should preserve default_external encoding.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14553&r2=14552
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/io.c?r1=14553&r2=14552
Index: ChangeLog
===================================================================
--- ChangeLog (revision 14552)
+++ ChangeLog (revision 14553)
@@ -23,6 +23,8 @@
* string.c (str_new_shared): was setting embedding flag of wrong
string object. [ruby-dev:32685]
+ * io.c (io_enc_str): should preserve default_external encoding.
+
Mon Dec 24 02:06:35 2007 Yukihiro Matsumoto <matz@r...>
* io.c (rb_f_open): documentation update.
Index: io.c
===================================================================
--- io.c (revision 14552)
+++ io.c (revision 14553)
@@ -1316,9 +1316,9 @@
rb_enc_from_encoding(fptr->enc),
rb_enc_from_encoding(fptr->enc2));
}
- else if (fptr->enc) {
+ else {
/* just one encoding, so associate it with the string */
- rb_enc_associate(str, fptr->enc);
+ rb_enc_associate(str, io_read_encoding(fptr));
}
return str;
}
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml