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

ruby-changes:9458

From: yugui <ko1@a...>
Date: Thu, 25 Dec 2008 18:51:05 +0900 (JST)
Subject: [ruby-changes:9458] Ruby:r20996 (ruby_1_9_1): merges r20907 from trunk into ruby_1_9_1.

yugui	2008-12-25 18:50:50 +0900 (Thu, 25 Dec 2008)

  New Revision: 20996

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

  Log:
    merges r20907 from trunk into ruby_1_9_1.
    * lib/rake.rb (Rake::FileList#egrep): change open mode to "rb",
      i.e. default to binary.    [ruby-dev:37385]
    * lib/rake.rb (Rake::FileList#egrep): allow specifying reading
      encoding, e.g. FileList['*.rb'].egrep(/require/, encoding:
      "ascii-8bit")

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/lib/rake.rb

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 20995)
+++ ruby_1_9_1/ChangeLog	(revision 20996)
@@ -1,3 +1,12 @@
+Sat Dec 20 15:34:36 2008  Yukihiro Matsumoto  <matz@r...>
+
+	* lib/rake.rb (Rake::FileList#egrep): change open mode to "rb",
+	  i.e. default to binary.    [ruby-dev:37385]
+
+	* lib/rake.rb (Rake::FileList#egrep): allow specifying reading
+	  encoding, e.g. FileList['*.rb'].egrep(/require/, encoding:
+	  "ascii-8bit")
+
 Mon Dec 22 10:59:31 2008  Yukihiro Matsumoto  <matz@r...>
 
 	* string.c (rb_str_upto): should return enumerator if called
Index: ruby_1_9_1/lib/rake.rb
===================================================================
--- ruby_1_9_1/lib/rake.rb	(revision 20995)
+++ ruby_1_9_1/lib/rake.rb	(revision 20996)
@@ -1477,9 +1477,9 @@
     # name, line number, and the matching line of text.  If no block is given,
     # a standard emac style file:linenumber:line message will be printed to
     # standard out.
-    def egrep(pattern)
+    def egrep(pattern, *opt)
       each do |fn|
-        open(fn) do |inf|
+        open(fn, "rb", *opt) do |inf|
           count = 0
           inf.each do |line|
             count += 1

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

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