ERROR: MethodError: no method matching iterate(::Nothing)

Hello,

I’m trying Introducing Julia/Working with text files - Wikibooks, open books for an open world with Julia 0.7

totaltime, totallines = open("sherlock-holmes.txt") do f
    linecounter = 0
    timetaken = @elapsed for l in eachline(f)
        linecounter += 1
    end
    (timetaken, linecounter)
end

but it raises

0.00626776313052
ERROR: MethodError: no method matching iterate(::Nothing)
Closest candidates are:
  iterate(::Core.SimpleVector) at essentials.jl:578
  iterate(::Core.SimpleVector, ::Any) at essentials.jl:578
  iterate(::ExponentialBackOff) at error.jl:171
  ...
Stacktrace:
 [1] indexed_iterate(::Nothing, ::Int64) at ./tuple.jl:63
 [2] top-level scope at none:0

Any idea was is wrong?

Maybe this document should be updated?

The code works for me on 1.0 (on a different file, of course).