Gregory Seidman wrote:
> inrange = false
> lines = open(file).read.split("\n").select { |line|
>   inrange &&= not /__Happy_Meal__/ === line
>   inrange ||= /__McDonalds__/ === line
> }
There is a lesser-known (and usually frowned upon?) feature in Ruby that 
treats Range notation differently in a "boolean context."

IO.foreach(file) do |line| # use this rather that loading the whole file
   if line =~ /__McDonalds__/ .. line =~ /__Happy_Meal__/
     do_stuff_with line
   end
end

Devin