path: root/lib/rake.rb
diff options
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-22 02:35:37 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-22 02:35:37 +0000
commit850df4b8e730905439bb3e33be746eda64d4e2a5 (patch)
tree4d0e5a1762123420b8dfa1ac31cd2a660e827765 /lib/rake.rb
parentf77f9da445cf033a165878366e767b49458bd3c2 (diff)
* 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") git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rake.rb')
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rake.rb b/lib/rake.rb
index 480068b..63412b1 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