- IO.foreach is lazy, but then you call `Array#grep` on it which allocate a huge Array - `grep` populate the "last_match" object, `String#match?` is much faster.