Project

General

Profile

Actions

Backport #5793

closed

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

Added by jonforums (Jon Forums) over 12 years ago. Updated about 12 years ago.


Description

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

Updated by kosaki (Motohiro KOSAKI) over 12 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) over 12 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) over 12 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) over 12 years ago

  • Assignee set to luislavena (Luis Lavena)

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

Updated by naruse (Yui NARUSE) about 12 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) about 12 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" 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/

Actions #8

Updated by naruse (Yui NARUSE) about 12 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.
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0