Project

General

Profile

Backport #5793

Please backport r33662, r33666 (ECONV_NEWLINE_DECORATOR_{READ,WRITE}_MASK)

Added by jonforums (Jon Forums) almost 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
[ruby-core:41780]

Description

Please backport r33662 and it's fixup r33666 to ruby_1_9_3.

Associated revisions

Revision 093ade0e
Added by naruse (Yui NARUSE) almost 8 years ago

merge revision(s) 33662,33666,33770: [Backport #5793]

r33662 | usa | 2011-11-08 02:48:11 +0900 (Tue, 08 Nov 2011) | 18 lines

  • 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.


    * 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.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 34542
Added by naruse (Yui NARUSE) almost 8 years ago

merge revision(s) 33662,33666,33770: [Backport #5793]

r33662 | usa | 2011-11-08 02:48:11 +0900 (Tue, 08 Nov 2011) | 18 lines

  • 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.


* 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.

History

Updated by kosaki (Motohiro KOSAKI) almost 8 years ago

Maybe, a following commit should be backported too.


r33770 | usa | 2011-11-15 21:36:08 -0500 (Tue, 15 Nov 2011) | 3 lines

  • io.c (argf_next_argv): wrong timing of setting ecflags. fixed the failure of TestArgf#test_textmode introduced at r33662.

Updated by kosaki (Motohiro KOSAKI) almost 8 years ago

  • Subject changed from Please backport r33662, r33666 to Please backport r33662, r33666 (ECONV_NEWLINE_DECORATOR_{READ,WRITE}_MASK)

Updated by jonforums (Jon Forums) almost 8 years ago

Motohiro KOSAKI wrote:

Maybe, a following commit should be backported too.


r33770 | usa | 2011-11-15 21:36:08 -0500 (Tue, 15 Nov 2011) | 3 lines

  • io.c (argf_next_argv): wrong timing of setting ecflags. fixed the failure of TestArgf#test_textmode introduced at r33662.

Yes; it's already part of our winio/ruby_1_9_3 branch:

https://github.com/thecodeshop/ruby/compare/ruby_1_9_3...winio/ruby_1_9_3

Updated by luislavena (Luis Lavena) almost 8 years ago

  • Assignee set to luislavena (Luis Lavena)

If nobody objects I'll backport this next week (wednesday tops)

Updated by naruse (Yui NARUSE) almost 8 years ago

Luis Lavena wrote:

If nobody objects I'll backport this next week (wednesday tops)

Why don't you backport?

Updated by luislavena (Luis Lavena) almost 8 years ago

Have too much work on my plate and traveling. Hiroshi is the author,
perhaps he can apply them directly?

Sorry for top posting. Sent from mobile.
On Feb 10, 2012 2:20 PM, "Yui NARUSE" naruse@airemix.jp wrote:

Issue #5793 has been updated by Yui NARUSE.

Luis Lavena wrote:

If nobody objects I'll backport this next week (wednesday tops)

Why don't you backport?

Backport #5793: Please backport r33662, r33666
(ECONV_NEWLINE_DECORATOR_{READ,WRITE}_MASK)
https://bugs.ruby-lang.org/issues/5793

Author: Jon Forums
Status: Open
Priority: Normal
Assignee: Luis Lavena
Category:
Target version:

Please backport r33662 and it's fixup r33666 to ruby_1_9_3.

--
http://bugs.ruby-lang.org/

#8

Updated by naruse (Yui NARUSE) almost 8 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r34542.
Jon, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 33662,33666,33770: [Backport #5793]

r33662 | usa | 2011-11-08 02:48:11 +0900 (Tue, 08 Nov 2011) | 18 lines

  • 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.


* 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.

Also available in: Atom PDF