proxy the __exit__ call
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
index 92fb040..1c71814 100644
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -413,7 +413,7 @@
             return result
     else:
         def __exit__(self, exc, value, tb):
-            pass
+            self.file.__exit__(exc, value, tb)
 
 
 def NamedTemporaryFile(mode='w+b', bufsize=-1, suffix="",