[ruby-cvs:67375] mame:r60194 (trunk): Suppress leak of file descriptors

mame at ruby-lang.org mame at ruby-lang.org
Tue Oct 17 16:41:03 JST 2017

mame	2017-10-17 16:41:03 +0900 (Tue, 17 Oct 2017)

  New Revision: 60194


    Suppress leak of file descriptors
    `Bundler.ui=` in `Gem::TestCase#setup` creates `Bundler::UI::RGProxy`
    which inherites `::Gem::SilentUI` whose `initialize` opens `/dev/null`,
    and assigns it to `Gem::DefaultUserInteraction.ui`.
    After that, `Gem::TestCase#setup` forces to overwrite
    `Gem::DefaultUserInteraction.ui` with a mock.
    Thus, the instance of `::Gem::SilentUI` is not closed, which leads to
    the leak.
    This commit keeps `Gem::DefaultUserInteraction.ui` and manually close it
    in `teardown`.

  Modified files:

More information about the ruby-cvs mailing list