diff options
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/change_maker.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tool/change_maker.rb b/tool/change_maker.rb index 3cf9dd663a..2bbc275d93 100755 --- a/tool/change_maker.rb +++ b/tool/change_maker.rb @@ -4,7 +4,9 @@ def diff2index(cmd, *argv) lines = [] path = nil output = `#{cmd} #{argv.join(" ")}` - output.force_encoding Encoding::BINARY + if defined? Encoding::BINARY + output.force_encoding Encoding::BINARY + end output.each_line do |line| case line when /^Index: (\S*)/, /^diff --git [a-z]\/(\S*) [a-z]\/\1/ |