Missing flush after File.open with a block?
-------------------------------------------
Key: JRUBY-1894
URL: http://jira.codehaus.org/browse/JRUBY-1894
Project: JRuby
Issue Type: Sub-task
Reporter: Charles Oliver Nutter
Assignee: Thomas E Enebo
Fix For: JRuby 1.1
Not exactly sure what's causing this one:
Error:
{noformat}
4) Failure:
test_putc(TestIO)
[test/rubicon/test_io.rb:753:in `upto'
test/rubicon/test_io.rb:753:in `test_putc'
test/rubicon/test_io.rb:753:in `open'
test/rubicon/test_io.rb:751:in `test_putc'
test/rubicon/test_io.rb:753:in `run']:
<255> expected but was
<nil>.
{noformat}
Test:
{code}
def test_putc
File.open(@file, "wb") do |file|
file.putc "A"
0.upto(255) { |ch| file.putc ch }
end
File.open(@file, "rb") do |file|
assert_equal(?A, file.getc)
0.upto(255) { |ch| assert_equal(ch, file.getc) }
end
end
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email