ruby-changes:59653
From: Nobuyoshi <ko1@a...>
Date: Thu, 9 Jan 2020 10:05:55 +0900 (JST)
Subject: [ruby-changes:59653] d254d5563e (master): vcs.rb: Get rid of Kernel#open
https://git.ruby-lang.org/ruby.git/commit/?id=d254d5563e From d254d5563e0e599f25aca9507683ee0abb9e18de Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 8 Jan 2020 21:39:39 +0900 Subject: vcs.rb: Get rid of Kernel#open diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb index 3553ed5..85e1199 100644 --- a/tool/lib/vcs.rb +++ b/tool/lib/vcs.rb @@ -411,9 +411,7 @@ class VCS https://github.com/ruby/ruby/blob/trunk/tool/lib/vcs.rb#L411 range = [to || 'HEAD', (from ? from+1 : branch_beginning(url))].compact.join(':') IO.popen({'TZ' => 'JST-9', 'LANG' => 'C', 'LC_ALL' => 'C'}, %W"#{COMMAND} log -r#{range} #{url}") do |r| - open(path, 'w') do |w| - IO.copy_stream(r, w) - end + IO.copy_stream(r, path) end end @@ -661,7 +659,7 @@ class VCS https://github.com/ruby/ruby/blob/trunk/tool/lib/vcs.rb#L659 def format_changelog_as_svn(path, arg) cmd = %W"#{COMMAND} log --topo-order --no-notes -z --format=%an%n%at%n%B" cmd.concat(arg) - open(path, 'w') do |w| + File.open(path, 'w') do |w| sep = "-"*72 + "\n" w.print sep cmd_pipe(cmd) do |r| -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/