Skip to content

Commit 8024454

Browse files
nobumatzbot
authored andcommitted
[ruby/reline] Fix tempfile leaks
(ruby/reline#757) https://github.com/ruby/reline/actions/runs/11187507536/job/31104699331#step:13:1064 ``` Children under /tmp/rubytest.m48l5o: * -rw------- 1 101 2024-10-02 17:43:51 +0000 rubyfile20241002-60503-bhbfgq ``` ruby/reline@1287f97a6f
1 parent e6fa7c3 commit 8024454

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

test/reline/test_reline.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,8 @@ def test_tty_amibuous_width
471471
w.close
472472
Process.waitpid pid
473473
end
474+
ensure
475+
File.delete(ruby_file.path) if ruby_file
474476
end
475477

476478
def get_reline_encoding

test/reline/yamatanooroti/test_rendering.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1814,6 +1814,9 @@ def test_stop_continue
18141814
write "\ebg"
18151815
assert_screen(/>abc\n>def\n>ghi\n/)
18161816
close
1817+
ensure
1818+
File.delete(rubyfile.path) if rubyfile
1819+
File.delete(pidfile.path) if pidfile
18171820
end
18181821

18191822
def write_inputrc(content)

0 commit comments

Comments
 (0)