mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
vcs.rb: Get rid of Kernel#open
This commit is contained in:
parent
65c2c75e16
commit
d254d5563e
1 changed files with 2 additions and 4 deletions
|
@ -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|
|
||||
|
|
Loading…
Reference in a new issue