-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File.open w/ File::RDWR should write \r\n but gets should read as \n after rewind on windows #3742
Comments
Bumping discovered windows issues from 1.7 windows work to 9.1.1.0 because we have not CI-greened 9k on appveyor yet. Next release we will have greenness. |
Next release, and the one after it, still don't have greenness on Appveyor...and this is an internal report, so I guess we bump it again. |
on windows it should print "\n" but it prints "\r\n" |
Based on @ahorek example this is still broken on Windows. It writes crlf to the file and reads it back in as crlf. Seems like binary mode is not working properly for this case but I am confirming CRuby behavior now. |
CRuby also writes CRLF to the file. The read is where it normalizes back to just LF, due to the mode not being On JRuby:
On CRuby:
Only the non-binary read mode seems to be in error here. |
It appears at a glance that we are setting up the right newline conversions in the IO transcoding pipeline, so this one will take more stepping to see why it is not normalizing CRLF to LF on a non-binary read. Not a critical item so punting to 9.3.1. |
Environment
Note: duplicated issue from #3738. This is broken differently than 1.7's version of this bug so I made a new issue to track it on 9k.
Broken on 9.0.5.0.
Expected Behavior
For the following script:
The comments dictate how it should behave.
Actual Behavior
On JRuby 9.0.5.0 it wil write "writing\n" instead of "writing\r\n" but it will read "writing\n".
The text was updated successfully, but these errors were encountered: