[前][次][番号順一覧][スレッド一覧]

ruby-changes:51410

From: kazu <ko1@a...>
Date: Sat, 9 Jun 2018 10:55:38 +0900 (JST)
Subject: [ruby-changes:51410] kazu:r63616 (trunk): Use `&.` instead of modifier if

kazu	2018-06-09 10:55:31 +0900 (Sat, 09 Jun 2018)

  New Revision: 63616

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63616

  Log:
    Use `&.` instead of modifier if

  Modified files:
    trunk/tool/extlibs.rb
Index: tool/extlibs.rb
===================================================================
--- tool/extlibs.rb	(revision 63615)
+++ tool/extlibs.rb	(revision 63616)
@@ -65,7 +65,7 @@ class ExtLibs https://github.com/ruby/ruby/blob/trunk/tool/extlibs.rb#L65
     when '.zip'
       pid = Process.spawn("unzip", inp, "-d", dir)
     end
-    f.close if f
+    f&.close
     Process.wait(pid)
     $?.success? or raise "failed to extract #{cache}"
   end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]