Commit cc1611da authored by Samuel E. Giddins's avatar Samuel E. Giddins

[Executable] Print buffer when we hit EOF

parent e1822c8d
...@@ -98,7 +98,8 @@ module Pod ...@@ -98,7 +98,8 @@ module Pod
Thread.new do Thread.new do
buf = '' buf = ''
begin begin
while s = input.readpartial(4096) loop do
s = input.readpartial(4096)
buf << s buf << s
lines = buf.split("\n") lines = buf.split("\n")
if buf[-1] == "\n" if buf[-1] == "\n"
...@@ -110,7 +111,7 @@ module Pod ...@@ -110,7 +111,7 @@ module Pod
lines.each { |l| output << (l << "\n") } lines.each { |l| output << (l << "\n") }
end end
rescue EOFError rescue EOFError
nil output << (buf << "\n") unless buf.size == 0
end end
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment