1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

leakchecker.rb: for older IO.console

* test/lib/leakchecker.rb (check_fd_leak): do not call older
  version IO.console to get rid of ArgumentError, so that older
  versions can run to compare the resuls.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-01-02 19:03:17 +00:00
parent 2743ad8c25
commit 4ef6097f9a

View file

@ -31,8 +31,8 @@ class LeakChecker
def check_fd_leak(test_name)
leaked = false
live1 = @fd_info
if IO.respond_to?(:console)
IO.console(:close)
if IO.respond_to?(:console) and (m = IO.method(:console)).arity.nonzero?
m[:close]
end
live2 = find_fds
fd_closed = live1 - live2