ruby-changes:2907
From: ko1@a...
Date: 21 Dec 2007 13:33:04 +0900
Subject: [ruby-changes:2907] matz - Ruby:r14398 (trunk): * io.c (rb_io_external_encoding): should fill delayed
matz 2007-12-21 13:32:53 +0900 (Fri, 21 Dec 2007)
New Revision: 14398
Modified files:
trunk/ChangeLog
trunk/io.c
Log:
* io.c (rb_io_external_encoding): should fill delayed
initialization for STDIN.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14398&r2=14397
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/io.c?r1=14398&r2=14397
Index: ChangeLog
===================================================================
--- ChangeLog (revision 14397)
+++ ChangeLog (revision 14398)
@@ -5,6 +5,9 @@
* encoding.c (rb_enc_from_encoding): returns Qnil for NULL
encoding.
+ * io.c (rb_io_external_encoding): should fill delayed
+ initialization for STDIN.
+
Fri Dec 21 13:09:11 2007 Tanaka Akira <akr@f...>
* encoding.c (rb_locale_charmap): return nil if no locale information.
Index: io.c
===================================================================
--- io.c (revision 14397)
+++ io.c (revision 14398)
@@ -5671,6 +5671,9 @@
rb_io_t *fptr;
GetOpenFile(io, fptr);
+ if (!fptr->enc && fptr->fd == 0) {
+ fptr->enc = rb_default_external_encoding();
+ }
return rb_enc_from_encoding(fptr->enc);
}
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml