https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112011-12-07T02:19:50ZRuby Issue Tracking SystemBackport193 - Backport #5704: Please backport r33937 (newline decorator)https://redmine.ruby-lang.org/issues/5704?journal_id=226132011-12-07T02:19:50Zjonforums (Jon Forums)
<ul></ul><p>FYI, in the hope that it helps with backporting, a branch containing Hiroshi's patch is being maintained at</p>
<p><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>
<p>The branch also contains backports of r33200 and r33662 so that the following tests pass when building with the RubyInstaller build recipes on Win7 32bit SP1:</p>
<p>make test-all TESTS='openssl fiddle psych zlib io ruby/test_io.rb ruby/test_io_m17n.rb ruby/test_file.rb'<br>
make test</p> Backport193 - Backport #5704: Please backport r33937 (newline decorator)https://redmine.ruby-lang.org/issues/5704?journal_id=229342011-12-23T01:17:57Zjonforums (Jon Forums)
<ul></ul><p>Please ensure the r33944 fixup patch for this issue is also backported.</p> Backport193 - Backport #5704: Please backport r33937 (newline decorator)https://redmine.ruby-lang.org/issues/5704?journal_id=230622012-01-03T10:17:17Zkosaki (Motohiro KOSAKI)kosaki.motohiro@gmail.com
<ul><li><strong>Subject</strong> changed from <i>Please backport r33937</i> to <i>Please backport r33937 (newline decorator)</i></li></ul> Backport193 - Backport #5704: Please backport r33937 (newline decorator)https://redmine.ruby-lang.org/issues/5704?journal_id=235302012-02-04T20:52:55Zh.shirosaki (Hiroshi Shirosaki)h.shirosaki@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/2430">commitlog.txt</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2430/commitlog.txt">commitlog.txt</a> added</li><li><strong>File</strong> <a href="/attachments/2431">winio_backport.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2431/winio_backport.patch">winio_backport.patch</a> added</li></ul><p>At <a href="https://blade.ruby-lang.org/ruby-core/42102">[ruby-core:42102]</a>, Luis mentioned</p>
<blockquote>
<p>I took the assignation of above tickets and will perform the backports<br>
next week tops.</p>
<p>If another committer disagree, please say so.</p>
</blockquote>
<p>It seems no one disagree.<br>
So I'll do the backports. I heard Luis was very busy with other work.</p>
<p>Backport patches are maintained at<br>
<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>
<p>These issues (11 commits) are a set of fixes. So I'll backport with one commit.</p>
<blockquote>
<p><a href="http://bugs.ruby-lang.org/issues/5794" class="external">http://bugs.ruby-lang.org/issues/5794</a><br>
<a href="http://bugs.ruby-lang.org/issues/5793" class="external">http://bugs.ruby-lang.org/issues/5793</a><br>
<a href="http://bugs.ruby-lang.org/issues/5792" class="external">http://bugs.ruby-lang.org/issues/5792</a><br>
<a href="http://bugs.ruby-lang.org/issues/5791" class="external">http://bugs.ruby-lang.org/issues/5791</a></p>
</blockquote>
<p>I attached a backport patch and commit log.<br>
I'll commit that with version.h PATCHLEVEL fix.</p>
<p>-#define RUBY_PATCHLEVEL 31<br>
+#define RUBY_PATCHLEVEL 32</p>
<p>I confirmed make, <code>make test</code> and <code>make test-all</code> are no problem.</p>
<p>Is this OK?</p>
<p>I cannot change redmine issue's status. Could anyone register me as a developer on redmine?</p> Backport193 - Backport #5704: Please backport r33937 (newline decorator)https://redmine.ruby-lang.org/issues/5704?journal_id=235532012-02-06T19:42:33Zusa (Usaku NAKAMURA)usa@garbagecollect.jp
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Assignee</strong> changed from <i>yugui (Yuki Sonoda)</i> to <i>usa (Usaku NAKAMURA)</i></li></ul> Backport193 - Backport #5704: Please backport r33937 (newline decorator)https://redmine.ruby-lang.org/issues/5704?journal_id=237062012-02-11T03:24:27Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>Status</strong> changed from <i>Assigned</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 r34543.<br>
Luis, thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<p>merge revision(s) 33937: [Backport <a class="issue tracker-4 status-5 priority-4 priority-default closed" title="Backport: Please backport r33937 (newline decorator) (Closed)" href="https://redmine.ruby-lang.org/issues/5704">#5704</a>]</p>
<pre><code>* ext/zlib/zlib.c (rb_gzreader_initialize): use binary mode by default
under Windows. Patch by Hiroshi Shirosaki. <a href="/issues/5562">[ruby-core:40706]</a>
[Feature #5562]
* include/ruby/encoding.h (void rb_econv_binmode): define NEWLINE
decorator.
* io.c (rb_cloexec_fcntl_dupfd): Introduce NEED_READCONV and
NEED_WRITECONV to replace universal newline decorator by CRLF only
when required to improve file reading and writing under Windows.
Patch by Hiroshi Shirosaki. <a href="/issues/5562">[ruby-core:40706]</a> [Feature #5562]
* io.c (do_writeconv): adjust binary mode if required.
* io.c (read_all, appendline, swallow, rb_io_getline_1): ditto.
* io.c (io_getc, rb_io_each_codepoint, rb_io_ungetc): ditto.
* io.c (rb_io_binmode, rb_io_ascii8bit_binmode): ditto.
* io.c (rb_io_extract_modeenc, rb_sysopen): ditto.
* io.c (pipe_open, prep_stdio, io_encoding_set): ditto.
* io.c (rb_io_s_pipe, copy_stream_body): ditto.
* test/ruby/test_io_m17n.rb (EOT): add test for pipe and stdin in
binary mode.
* win32/win32.c (init_stdhandle): remove O_BINARY from stdhandle
initialization.
* win32/win32.c (rb_w32_write): use FTEXT mode accordingly.
</code></pre>