tags:

views:

96

answers:

1

Hey,

Does anyone know how tempfile.rb is handled in JRuby. It is in Ruby but not in JRuby.

Anyone got anyideas?

Cheers

Eef

+2  A: 

You can still "require 'tempfile'" and it will work.

In JRuby, Tempfile is implemented in Java. We were able to improve the performance substantially, and avoid the buggy stdlib version in the process.

Nick Sieger
do you know where I can find documentation or some example code? Cheers
Eef
Assume it works the same as Ruby's tempfile.rb: http://www.ruby-doc.org/stdlib/libdoc/tempfile/rdoc/classes/Tempfile.html
Nick Sieger
I'm trying to use appengine-jruby, where Tempfile is supposed to be patched and replaced by StringIO, but id doesn't work, it's still using Java implementation which tries to write into a real file, that is not accessible on GAE. http://pastie.org/791460
skrat