[前][次][番号順一覧][スレッド一覧]

ruby-changes:19337

From: nobu <ko1@a...>
Date: Fri, 29 Apr 2011 10:27:02 +0900 (JST)
Subject: [ruby-changes:19337] Ruby:r31377 (trunk): * io.c (make_writeconv): do not add textmode newline decorator if any

nobu	2011-04-29 10:24:54 +0900 (Fri, 29 Apr 2011)

  New Revision: 31377

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31377

  Log:
    * io.c (make_writeconv): do not add textmode newline decorator if any
      newline decorator is set already.  fixes #4618, fixes #4619

  Modified files:
    trunk/ChangeLog
    trunk/io.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 31376)
+++ ChangeLog	(revision 31377)
@@ -1,3 +1,8 @@
+Fri Apr 29 10:24:51 2011  Nobuyoshi Nakada  <nobu@r...>
+
+	* io.c (make_writeconv): do not add textmode newline decorator if any
+	  newline decorator is set already.  fixes #4618, fixes #4619
+
 Fri Apr 29 10:17:42 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
 
 	* thread.c (lock_func): small cleanup.
Index: io.c
===================================================================
--- io.c	(revision 31376)
+++ io.c	(revision 31377)
@@ -789,7 +789,8 @@
         ecflags = fptr->encs.ecflags;
         ecopts = fptr->encs.ecopts;
 #ifdef TEXTMODE_NEWLINE_DECORATOR_ON_WRITE
-        if (NEED_NEWLINE_DECORATOR_ON_WRITE(fptr))
+	if (NEED_NEWLINE_DECORATOR_ON_WRITE(fptr) &&
+	    !(ecflags & ECONV_NEWLINE_DECORATOR_MASK))
             ecflags |= TEXTMODE_NEWLINE_DECORATOR_ON_WRITE;
 #endif
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]