ruby-changes:70737
From: Kazuhiro <ko1@a...>
Date: Wed, 5 Jan 2022 09:06:43 +0900 (JST)
Subject: [ruby-changes:70737] d5836db1b3 (master): Fix `Leaked file descriptor: TestIO_Console#test_console_kw`
https://git.ruby-lang.org/ruby.git/commit/?id=d5836db1b3 From d5836db1b398a7936b0461b3011db66f6cc8c490 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA <zn@m...> Date: Wed, 5 Jan 2022 09:04:15 +0900 Subject: Fix `Leaked file descriptor: TestIO_Console#test_console_kw` ``` Leaked file descriptor: TestIO_Console#test_console_kw: 10 : #<File:/dev/tty> ``` --- test/io/console/test_io_console.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb index ac75df7f0c3..3c29f9f2b34 100644 --- a/test/io/console/test_io_console.rb +++ b/test/io/console/test_io_console.rb @@ -488,7 +488,9 @@ defined?(IO.console) and TestIO_Console.class_eval do https://github.com/ruby/ruby/blob/trunk/test/io/console/test_io_console.rb#L488 end def test_console_kw - assert_kind_of(IO, IO.console(:clone, freeze: true)) + io = IO.console(:clone, freeze: true) + io.close + assert_kind_of(IO, io) end def test_sync -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/