ruby-changes:61023
From: Nobuyoshi <ko1@a...>
Date: Wed, 6 May 2020 14:09:30 +0900 (JST)
Subject: [ruby-changes:61023] de3f725978 (master): Makes nil-safe
https://git.ruby-lang.org/ruby.git/commit/?id=de3f725978 From de3f725978730d16ee51401d40fa75ac12c871a0 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 6 May 2020 14:08:26 +0900 Subject: Makes nil-safe diff --git a/tool/lib/leakchecker.rb b/tool/lib/leakchecker.rb index bd0e24b..a94d7a7 100644 --- a/tool/lib/leakchecker.rb +++ b/tool/lib/leakchecker.rb @@ -100,7 +100,7 @@ class LeakChecker https://github.com/ruby/ruby/blob/trunk/tool/lib/leakchecker.rb#L100 next if /darwin/ =~ RUBY_PLATFORM and [0, -1].include?(s.dev) str << ' ' << s.inspect ensure - io.close + io&.close end end puts "Leaked file descriptor: #{test_name}: #{fd}#{str}" -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/