Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Reinstate Tempfile finalizer to ensure it is deleted. Fixes #1133

  • Loading branch information...
commit 5561fcd5311a82e8721289b2c097c03c450cd45a 1 parent 90a814e
@headius headius authored
View
9 core/src/main/java/org/jruby/ext/tempfile/Tempfile.java
@@ -269,4 +269,13 @@ public IRubyObject inspect() {
val.append(">");
return getRuntime().newString(val.toString());
}
+
+ @Override
+ protected void finalize() throws Throwable {
+ try {
+ super.finalize();
+ } finally {
+ tmpFile.delete();
+ }
+ }
}
View
1  test/jruby.1.9.index
@@ -102,3 +102,4 @@ test_jar_file
test_jruby_synchronized
test_instantiating_interfaces
test_openssl
+test_tempfile_cleanup
Please sign in to comment.
Something went wrong with that request. Please try again.