All of the following API do the same thing: open a file and call a block for each line. Is there any preference we should use one than another?
File.open("file").each_line {|line| puts line}
open("file").each_line {|line| puts line}
IO.foreach("file") {|line | puts line}