Jruby Marshal/IO.eof bug?

The following code seems to work in MRI, but not in jruby:

File.open("/tmp/foo", “w”) do |f|
Marshal.dump(“hey”, f)
Marshal.dump(“there”, f)
end
File.open("/tmp/foo", “r”) do |f|
puts Marshal.load(f)
puts Marshal.load(f)
end

% ruby iotest.rb
hey
there

% jruby iotest.rb
hey
iotest.rb:10:in load': End of file reached (EOFError) from iotest.rb:10 from iotest.rb:7:inopen’
from iotest.rb:7

Changing the test to use the loop “while not f.eof” causes jruby to fail
before the first iteration.

I have tried this with jruby 1.0.3 and 1.1.1.

JRuby bug?

chris


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Please file a Jira issue for this…it defintely looks like a bug.

-Tom


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: [email protected] , [email protected]


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs