Skip to content
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

Tempfile#open on windows unconditionally opens in "b" mode messing CRLF logic (--1.9) #3727

enebo opened this issue Mar 11, 2016 · 0 comments


Copy link

enebo commented Mar 11, 2016


jruby 1.7.25-SNAPSHOT (1.9.3p551) 2016-03-09 fed46bd on Java HotSpot(TM) 64-Bit Server VM 1.8.0_74-b02 +jit [Windows 7-amd64]

(works as expected on 9k)

Expected Behavior

require 'tempfile'
f ="test-truncate")
f.puts "abc"
f.puts "def"
f.gets # should == "abc\n"

Actual Behavior

It will f.gets will equal "abc\r\n".


This occurs multiple times in MRI test suite so I am confident this will get coverage but I will try and remember to add a spec if it is not adequately covered in ruby/spec.

@enebo enebo added this to the JRuby 1.7.25 milestone Mar 11, 2016
enebo added a commit that referenced this issue Mar 11, 2016
@enebo enebo closed this as completed Mar 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant