ruby-changes:55631
From: Nobuyoshi <ko1@a...>
Date: Tue, 30 Apr 2019 22:23:41 +0900 (JST)
Subject: [ruby-changes:55631] Nobuyoshi Nakada:50872f4a15 (trunk): Use array mode of `system` instead of `shellescape`
https://git.ruby-lang.org/ruby.git/commit/?id=50872f4a15 From 50872f4a15a2070fa007c1d85fcf44802e4bcc0b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 30 Apr 2019 22:23:20 +0900 Subject: Use array mode of `system` instead of `shellescape` `&.` is not available in ruby 2.0. diff --git a/tool/merger.rb b/tool/merger.rb index 025a559..5f48f2e 100755 --- a/tool/merger.rb +++ b/tool/merger.rb @@ -196,10 +196,11 @@ class << Merger https://github.com/ruby/ruby/blob/trunk/tool/merger.rb#L196 def diff(file = nil) if svn_mode? - `svn diff --diff-cmd=diff -x -upw #{file&.shellescape}` + command = %w[svn diff --diff-cmd=diff -x -upw] else - `git diff --color #{file&.shellescape}` + command = %w[git diff --color] end + IO.popen(command + [file], &:read) end def commit(file) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/