diff --git a/ChangeLog b/ChangeLog index f23954b819..aa514e7528 100644 --- a/ChangeLog +++ b/ChangeLog @@ -51,6 +51,15 @@ Sat Dec 20 18:28:26 2008 Nobuyoshi Nakada * win32/win32.c (has_redirection): supports environment variables references. +Sat Dec 20 15:34:36 2008 Yukihiro Matsumoto + + * 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") + Sat Dec 20 10:59:16 2008 Yuki Sonoda (Yugui) * lib/irb/locale.rb (IRB::Locale#initialize) diff --git a/lib/rake.rb b/lib/rake.rb index 480068be7a..63412b1531 100755 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -1477,9 +1477,9 @@ module Rake # 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