mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
11125bf46a
commit
0b1ff93945
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Mar 7 10:40:49 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* tool/change_maker.rb (#diff2index): check Encoding::BINARY.
|
||||
BASERUBY may still be 1.8.x.
|
||||
|
||||
Thu Mar 7 08:47:42 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* NEWS (Mutex#owned?): no longer experimental.
|
||||
|
|
|
@ -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/
|
||||
|
|
Loading…
Reference in a new issue