summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-25 09:50:50 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-25 09:50:50 +0000
commitb15ca506d2ee72725fb486d586419b59b0563def (patch)
treef0b9ccd71ad62c9fd52a44c73c082bb25c659cd9 /lib
parent863882ea3e39b2c6e149a9f6affcbd4ba9b03228 (diff)
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") git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rwxr-xr-xlib/rake.rb4
1 files changed, 2 insertions, 2 deletions
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