Issue #6179 has been updated by h.shirosaki (Hiroshi Shirosaki).

File pos_fix.patch added

Thank you for your work.
I confirmed the bug. io_unread() with mode "r" had a bug. IO#pos calls io_unread().

Trunk also has same bug.
I've created a patch which replaces io_unread(). Heesob's test case was passed.
`make test` && `make test-all` look fine.

The patch is against trunk.
Could you review and try the patch?
----------------------------------------
Bug #6179: File::pos broken in Windows 1.9.3p125
https://bugs.ruby-lang.org/issues/6179#change-25022

Author: jmthomas (Jason Thomas)
Status: Assigned
Priority: Normal
Assignee: h.shirosaki (Hiroshi Shirosaki)
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3p125 (2012-02-16) [i386-mingw32]


Calling the pos method on a File in the Windows version of Ruby on 1.9.3p125 moves the file pointer. Thus it can not be called without side effect.


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