diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb index ac75df7f0c..3c29f9f2b3 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 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