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