summaryrefslogtreecommitdiff
path: root/tool/change_maker.rb
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-10 23:01:07 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-10 23:01:07 +0000
commit0b1ff939455a96bb2e715d029c0d412af8de593a (patch)
tree79c018b4b17faecc382ae525aca46fb9379b9e0c /tool/change_maker.rb
parent11125bf46aac1099912133d84e304eefd5a8f841 (diff)
* tool/change_maker.rb (#diff2index): check Encoding::BINARY.
BASERUBY may still be 1.8.x. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 3cf9dd6..2bbc275 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/