F. Senault wrote:
> File.open("script.rb") do |fichier|
>   fichier.each do |ligne|
>     if ligne.downcase.include? "ruby"
>       puts ligne 
>     end
>   end
> end
> 
> File.open("script.rb") do |f|
>   f.each { |l| puts l if l=~/ruby/i }
> end

It's worth mentioning this, too:

puts `grep -i ruby script.rb`