Merge: Each line
Improve IStream and Path for easiness of reading.
First, add new iterator `each_line` that lazily `read_line` of a stream.
Second, wrap some reading methods on `Path` so that the input of data from files is really easy.
~~~nit
var content = "/etc/issue".to_path.read_all
print content
~~~
and
~~~nit
for l in "/etc/passwd".to_path.each_line do
var fields = l.split(":")
print "name={fields[0]} uid={fields[2]}"
end
~~~
TODO: better error management
Pull-Request: #1033
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>