From: James Edward Gray II Date: 2005-09-11T00:31:11+09:00 Subject: Re: Using Ruby as a preprocessor for another language On Sep 10, 2005, at 4:26 AM, Malte Milatz wrote: > Gavin Kistner wrote: > [erb] > >> % nps.each do |thug| >> % _erbout << "The thug's name is: #{thug.name}" >> % end >> > > Furthermore, if erb is supposed to send its output to STDOUT, > there's no > problem to simply use "puts" here. Yes there is. A call to puts() would be resolved when it is interpreted, while the rest of the template output would come out once the whole thing has been generated. The output would be out of order. Avoid puts() in ERb, or use the patch floating around that makes it work as expected there. James Edward Gray II