https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112011-12-23T01:48:12ZRuby Issue Tracking SystemBackport193 - Backport #5793: Please backport r33662, r33666 (ECONV_NEWLINE_DECORATOR_{READ,WRITE}_MASK)https://bugs.ruby-lang.org/issues/5793?journal_id=229352011-12-23T01:48:12Zjonforums (Jon Forums)
<ul></ul><p>FYI, a pre-backported version is being maintained on <a href="https://github.com/thecodeshop/ruby/commits/winio/ruby_1_9_3/" class="external">https://github.com/thecodeshop/ruby/commits/winio/ruby_1_9_3/</a></p> Backport193 - Backport #5793: Please backport r33662, r33666 (ECONV_NEWLINE_DECORATOR_{READ,WRITE}_MASK)https://bugs.ruby-lang.org/issues/5793?journal_id=230482012-01-03T09:47:34Zkosaki (Motohiro KOSAKI)kosaki.motohiro@gmail.com
<ul></ul><p>Maybe, a following commit should be backported too.</p>
<hr>
<p>r33770 | usa | 2011-11-15 21:36:08 -0500 (Tue, 15 Nov 2011) | 3 lines</p>
<ul>
<li>io.c (argf_next_argv): wrong timing of setting ecflags.<br>
fixed the failure of TestArgf#test_textmode introduced at r33662.</li>
</ul> Backport193 - Backport #5793: Please backport r33662, r33666 (ECONV_NEWLINE_DECORATOR_{READ,WRITE}_MASK)https://bugs.ruby-lang.org/issues/5793?journal_id=230492012-01-03T09:49:41Zkosaki (Motohiro KOSAKI)kosaki.motohiro@gmail.com
<ul><li><strong>Subject</strong> changed from <i>Please backport r33662, r33666</i> to <i>Please backport r33662, r33666 (ECONV_NEWLINE_DECORATOR_{READ,WRITE}_MASK)</i></li></ul> Backport193 - Backport #5793: Please backport r33662, r33666 (ECONV_NEWLINE_DECORATOR_{READ,WRITE}_MASK)https://bugs.ruby-lang.org/issues/5793?journal_id=232872012-01-13T01:53:02Zjonforums (Jon Forums)
<ul></ul><p>Motohiro KOSAKI wrote:</p>
<blockquote>
<p>Maybe, a following commit should be backported too.</p>
<hr>
<p>r33770 | usa | 2011-11-15 21:36:08 -0500 (Tue, 15 Nov 2011) | 3 lines</p>
<ul>
<li>io.c (argf_next_argv): wrong timing of setting ecflags.<br>
fixed the failure of TestArgf#test_textmode introduced at r33662.</li>
</ul>
</blockquote>
<p>Yes; it's already part of our <code>winio/ruby_1_9_3</code> branch:</p>
<p><a href="https://github.com/thecodeshop/ruby/compare/ruby_1_9_3...winio/ruby_1_9_3" class="external">https://github.com/thecodeshop/ruby/compare/ruby_1_9_3...winio/ruby_1_9_3</a></p> Backport193 - Backport #5793: Please backport r33662, r33666 (ECONV_NEWLINE_DECORATOR_{READ,WRITE}_MASK)https://bugs.ruby-lang.org/issues/5793?journal_id=232922012-01-13T09:10:11Zluislavena (Luis Lavena)luislavena@gmail.com
<ul><li><strong>Assignee</strong> set to <i>luislavena (Luis Lavena)</i></li></ul><p>If nobody objects I'll backport this next week (wednesday tops)</p> Backport193 - Backport #5793: Please backport r33662, r33666 (ECONV_NEWLINE_DECORATOR_{READ,WRITE}_MASK)https://bugs.ruby-lang.org/issues/5793?journal_id=236992012-02-11T02:19:18Znaruse (Yui NARUSE)naruse@airemix.jp
<ul></ul><p>Luis Lavena wrote:</p>
<blockquote>
<p>If nobody objects I'll backport this next week (wednesday tops)</p>
</blockquote>
<p>Why don't you backport?</p> Backport193 - Backport #5793: Please backport r33662, r33666 (ECONV_NEWLINE_DECORATOR_{READ,WRITE}_MASK)https://bugs.ruby-lang.org/issues/5793?journal_id=237022012-02-11T02:53:14Zluislavena (Luis Lavena)luislavena@gmail.com
<ul></ul><p>Have too much work on my plate and traveling. Hiroshi is the author,<br>
perhaps he can apply them directly?</p>
<p>Sorry for top posting. Sent from mobile.<br>
On Feb 10, 2012 2:20 PM, "Yui NARUSE" <a href="mailto:naruse@airemix.jp" class="email">naruse@airemix.jp</a> wrote:</p>
<blockquote>
<p>Issue <a class="issue tracker-4 status-5 priority-4 priority-default closed" title="Backport: Please backport r33662, r33666 (ECONV_NEWLINE_DECORATOR_{READ,WRITE}_MASK) (Closed)" href="https://bugs.ruby-lang.org/issues/5793">#5793</a> has been updated by Yui NARUSE.</p>
<p>Luis Lavena wrote:</p>
<blockquote>
<p>If nobody objects I'll backport this next week (wednesday tops)</p>
</blockquote>
<a name="Why-dont-you-backport"></a>
<h2 >Why don't you backport?<a href="#Why-dont-you-backport" class="wiki-anchor">¶</a></h2>
<p>Backport <a class="issue tracker-4 status-5 priority-4 priority-default closed" title="Backport: Please backport r33662, r33666 (ECONV_NEWLINE_DECORATOR_{READ,WRITE}_MASK) (Closed)" href="https://bugs.ruby-lang.org/issues/5793">#5793</a>: Please backport r33662, r33666<br>
(ECONV_NEWLINE_DECORATOR_{READ,WRITE}_MASK)<br>
<a href="https://bugs.ruby-lang.org/issues/5793" class="external">https://bugs.ruby-lang.org/issues/5793</a></p>
<p>Author: Jon Forums<br>
Status: Open<br>
Priority: Normal<br>
Assignee: Luis Lavena<br>
Category:<br>
Target version:</p>
<p>Please backport r33662 and it's fixup r33666 to ruby_1_9_3.</p>
<p>--<br>
<a href="http://bugs.ruby-lang.org/" class="external">http://bugs.ruby-lang.org/</a></p>
</blockquote> Backport193 - Backport #5793: Please backport r33662, r33666 (ECONV_NEWLINE_DECORATOR_{READ,WRITE}_MASK)https://bugs.ruby-lang.org/issues/5793?journal_id=237052012-02-11T03:21:03Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>This issue was solved with changeset r34542.<br>
Jon, thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<a name="merge-revisions-336623366633770-Backport-5793"></a>
<h2 >merge revision(s) 33662,33666,33770: [Backport <a class="issue tracker-4 status-5 priority-4 priority-default closed" title="Backport: Please backport r33662, r33666 (ECONV_NEWLINE_DECORATOR_{READ,WRITE}_MASK) (Closed)" href="https://bugs.ruby-lang.org/issues/5793">#5793</a>]<a href="#merge-revisions-336623366633770-Backport-5793" class="wiki-anchor">¶</a></h2>
<p>r33662 | usa | 2011-11-08 02:48:11 +0900 (Tue, 08 Nov 2011) | 18 lines</p>
<ul>
<li>
<p>include/ruby/encoding.h (ECONV_NEWLINE_DECORATOR_READ_MASK,<br>
ECONV_NEWLINE_DECORATOR_WRITE_MASK): new macro.</p>
</li>
<li>
<p>io.c (rb_io_extract_modeenc, pipe_open, prep_stdio, argf_next_argv):<br>
set TEXTMODE_NEWLINE_DECORATOR_ON_WRITE for textmode on creating IO<br>
if the flag is available.</p>
</li>
<li>
<p>io.c (make_writeconv): drop decorators for reading.</p>
</li>
<li>
<p>io.c (make_readconv): drop decorators for writing.</p>
</li>
<li>
<p>io.c (do_writeconv): existing writeconv is not the condition to raise<br>
ArgumentError. should check textmode or not.</p>
</li>
<li>
<p>test/ruby/test_io_m17n.rb<br>
(TestIO_M17N#test_{cr,lf,crlf}_decorator_on_stdout): test above<br>
changes.</p>
</li>
</ul>
<hr>
<pre><code>* include/ruby/encoding.h (ECONV_NEWLINE_DECORATOR_READ_MASK,
ECONV_NEWLINE_DECORATOR_WRITE_MASK): new macro.
* io.c (rb_io_extract_modeenc, pipe_open, prep_stdio, argf_next_argv):
set TEXTMODE_NEWLINE_DECORATOR_ON_WRITE for textmode on creating IO
if the flag is available.
* io.c (make_writeconv): drop decorators for reading.
* io.c (make_readconv): drop decorators for writing.
* io.c (do_writeconv): existing writeconv is not the condition to raise
ArgumentError. should check textmode or not.
* test/ruby/test_io_m17n.rb
(TestIO_M17N#test_{cr,lf,crlf}_decorator_on_stdout): test above
changes.
* io.c (argf_next_argv): wrong timing of setting ecflags.
fixed the failure of TestArgf#test_textmode introduced at r33662.
</code></pre>