Eric Hodel created JRUBY-6477: --------------------------------- Summary: Tempfile#stat raises java.lang.NullPointerException when unlinked Key: JRUBY-6477 URL: https://jira.codehaus.org/browse/JRUBY-6477 Project: JRuby Issue Type: Bug Components: Standard Library Affects Versions: JRuby 1.6.6 Environment: OS X 10.7.3 Reporter: Eric Hodel Assignee: Thomas E Enebo
require 'tempfile' Tempfile.open 'test' do |io| io.unlink io.write "hi" io.rewind # flush p io.stat.size end When run with ruby 1.8: $ ruby -v t.rb ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0] 2 When run with jruby: $ jruby -v t.rb Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java... jruby 1.6.6 (ruby-1.8.7-p357) (2012-01-30 5673572) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java] RubyFileStat.java:115:in `setup': java.lang.NullPointerException from RubyFileStat.java:92:in `newFileStat' from Ruby.java:2894:in `newFileStat' from RubyFile.java:834:in `stat' from RubyFile$i$0$0$stat.gen:65535:in `call' from CachingCallSite.java:292:in `cacheAndCall' from CachingCallSite.java:135:in `call' from t.rb:9:in `block_0$RUBY$__file__' from t$block_0$RUBY$__file__:65535:in `call' from CompiledBlock.java:112:in `yield' from CompiledBlock.java:95:in `yield' from Block.java:130:in `yield' from RubyTempfile.java:265:in `open' from RubyTempfile$s$0$1$open.gen:65535:in `call' from DynamicMethod.java:211:in `call' from CachingCallSite.java:322:in `cacheAndCall' from CachingCallSite.java:178:in `callBlock' from CachingCallSite.java:187:in `callIter' from t.rb:3:in `__file__' from t.rb:-1:in `load' from Ruby.java:695:in `runScript' from Ruby.java:688:in `runScript' from Ruby.java:595:in `runNormally' from Ruby.java:444:in `runFromMain' from Main.java:344:in `doRunFromMain' from Main.java:256:in `internalRun' from Main.java:222:in `run' from Main.java:206:in `run' from Main.java:186:in `main' -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.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