summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-01-08 21:39:39 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-01-09 10:04:22 +0900
commitd254d5563e0e599f25aca9507683ee0abb9e18de (patch)
tree298cfbe3b38487352cd97bb45441921198811368 /tool
parent65c2c75e162ebc8c4b35b0823967eeb132c00749 (diff)
vcs.rb: Get rid of Kernel#open
Diffstat (limited to 'tool')
-rw-r--r--tool/lib/vcs.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb
index 3553ed51a9..85e119995a 100644
--- a/tool/lib/vcs.rb
+++ b/tool/lib/vcs.rb
@@ -411,9 +411,7 @@ class VCS
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
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|