From 062be2fb3bb3914740f0753ca63827a6b5e9ea77 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 1 Oct 2026 19:38:28 +0900 Subject: [PATCH] Fix tempfile leak The `tempfile` variable refers to different things in the first half and the second half. --- test/json/json_common_interface_test.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/json/json_common_interface_test.rb b/test/json/json_common_interface_test.rb index 4fb161569..0fbc2df7a 100644 --- a/test/json/json_common_interface_test.rb +++ b/test/json/json_common_interface_test.rb @@ -129,6 +129,7 @@ def test_load tempfile.write @json tempfile.rewind assert_equal @hash, JSON.load(tempfile) + tempfile.close! stringio = StringIO.new(@json) stringio.rewind