summaryrefslogtreecommitdiff
path: root/tool/change_maker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/change_maker.rb')
-rwxr-xr-xtool/change_maker.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/tool/change_maker.rb b/tool/change_maker.rb
index 0ca195f77a..3cf9dd663a 100755
--- a/tool/change_maker.rb
+++ b/tool/change_maker.rb
@@ -3,7 +3,9 @@
def diff2index(cmd, *argv)
lines = []
path = nil
- `#{cmd} #{argv.join(" ")}`.split(/\n/).each do |line|
+ output = `#{cmd} #{argv.join(" ")}`
+ output.force_encoding Encoding::BINARY
+ output.each_line do |line|
case line
when /^Index: (\S*)/, /^diff --git [a-z]\/(\S*) [a-z]\/\1/
path = $1