Skip to content

Commit 87ad757

Browse files
authored
Allow the api to close Tempfiles inline
Allows the the gem to clean up temporary files at execution time rather than relying on the Garbage Collector to clean up or other parts of the MRI calling the object space finalize methods.
1 parent 07c9cbf commit 87ad757

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/fog/storage/google_json/requests/get_object.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ def get_object(bucket_name, object_name,
6868
end
6969

7070
object
71+
ensure
72+
buf.close! rescue nil
7173
end
7274
end
7375

0 commit comments

Comments
 (0)