Can anyone provide some clues as to why these two pieces of code are not equivalent? My only thought is that the .open in the latter code portion is not in a block and the file handle is left open.
File.open(file) do |io|
io.each_line do |line|
body_string << line
end
end
and this one
File.open(file).each_line {|line| body_string << line}
Thanks.