Project

General

Profile

Backport #6422

Please backport r35594 (Windows bug with File.pos)

Added by h.shirosaki (Hiroshi Shirosaki) almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
[ruby-core:44982]

Description

Fix for #6401 Windows bug with File.pos.

Fix of #6179 was insufficient. This fix also should be merged to 1.9.3.
I confirmed make test and test-all were fine with ruby 1.9.3p208 (2012-05-10 revision 35603) [i386-mingw32].

Revision is r35594

Associated revisions

Revision 64b6f2b2
Added by naruse (Yui NARUSE) almost 7 years ago

merge revision(s) 35594: [Backport #6422]

* io.c (io_unread): fix IO#pos with mode 'r' bug on Windows.
  If the end of reading buffer is CR, io_unread() needs to unread one
  more byte.
  [ruby-core:44874] [Bug #6401]

* test/ruby/test_io_m17n.rb (TestIO_M17N#test_pos_with_buffer_end_cr):
  add a test for above.

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

Revision 35613
Added by naruse (Yui NARUSE) almost 7 years ago

merge revision(s) 35594: [Backport #6422]

* io.c (io_unread): fix IO#pos with mode 'r' bug on Windows.
  If the end of reading buffer is CR, io_unread() needs to unread one
  more byte.
  [ruby-core:44874] [Bug #6401]

* test/ruby/test_io_m17n.rb (TestIO_M17N#test_pos_with_buffer_end_cr):
  add a test for above.

History

#1

Updated by naruse (Yui NARUSE) almost 7 years ago

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

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


merge revision(s) 35594: [Backport #6422]

* io.c (io_unread): fix IO#pos with mode 'r' bug on Windows.
  If the end of reading buffer is CR, io_unread() needs to unread one
  more byte.
  [ruby-core:44874] [Bug #6401]

* test/ruby/test_io_m17n.rb (TestIO_M17N#test_pos_with_buffer_end_cr):
  add a test for above.

Also available in: Atom PDF