[前][次][番号順一覧][スレッド一覧]

ruby-changes:27660

From: kosaki <ko1@a...>
Date: Mon, 11 Mar 2013 08:01:16 +0900 (JST)
Subject: [ruby-changes:27660] kosaki:r39712 (trunk): * tool/change_maker.rb (#diff2index): check Encoding::BINARY.

kosaki	2013-03-11 08:01:07 +0900 (Mon, 11 Mar 2013)

  New Revision: 39712

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39712

  Log:
    * tool/change_maker.rb (#diff2index): check Encoding::BINARY.
      BASERUBY may still be 1.8.x.

  Modified files:
    trunk/ChangeLog
    trunk/tool/change_maker.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39711)
+++ ChangeLog	(revision 39712)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Mar  7 10:40:49 2013  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* 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@g...>
 
 	* NEWS (Mutex#owned?): no longer experimental.
Index: tool/change_maker.rb
===================================================================
--- tool/change_maker.rb	(revision 39711)
+++ tool/change_maker.rb	(revision 39712)
@@ -4,7 +4,9 @@ def diff2index(cmd, *argv) https://github.com/ruby/ruby/blob/trunk/tool/change_maker.rb#L4
   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/

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]