Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.5, JRuby 1.7.0.pre1
-
Fix Version/s: JRuby 1.6.6, JRuby 1.7.0.pre1
-
Component/s: Ruby 1.9.3, Standard Library
-
Labels:None
-
Number of attachments :
Description
Tempfile#open's behavior has changed from 1.8 to 1.9, but that change has not been reflected in JRuby 1.9 mode. When given a block, it used to return nil in 1.8, but in 1.9 it is supposed to return the value of the block. JRuby in 1.9 mode continues to return nil.
in MRI ruby I get:
$ irb
1.9.3p0 :001 > require 'tempfile'
1.9.3p0 :006 > Tempfile.open('foo')
=> "/tmp/foo20120105-20998-z3gawt"
In JRuby, however:
$ JRUBY_OPTS=--1.9 irb
jruby-1.7.0.dev :001 > require 'tempfile'
jruby-1.7.0.dev :002 > Tempfile.open('foo') { |tmp| tmp.path }
=> nil
Thanks for reporting.
Fixed on the master (0d43528e) and the 1.6 (9affb57a).