Commit 5fe46b21 authored by Toshi MARUYAMA's avatar Toshi MARUYAMA Committed by Eric Davis

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
parent 7c57bd35
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment