scm: use "ASCII-8BIT" in IO.popen() in Ruby 1.9.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4938 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
f27637b07c
commit
e51aeb5a40
|
@ -200,7 +200,12 @@ module Redmine
|
|||
cmd = "#{cmd} 2>>#{RAILS_ROOT}/log/scm.stderr.log"
|
||||
end
|
||||
begin
|
||||
IO.popen(cmd, "r+") do |io|
|
||||
if RUBY_VERSION < '1.9'
|
||||
mode = "r+"
|
||||
else
|
||||
mode = "r+:ASCII-8BIT"
|
||||
end
|
||||
IO.popen(cmd, mode) do |io|
|
||||
io.close_write
|
||||
block.call(io) if block_given?
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue