From: Bill Atkins Date: 2005-01-13T01:32:41+09:00 Subject: Re: Webrick, erb, and .rhtml print or puts will send their output to STDOUT - anything sent there will go to the shell that you used to start webrick. ERb is simply transforming a string, so you have to use <%= to get portions of that string replaced with something else. Bill On Thu, 13 Jan 2005 01:25:17 +0900, Belorion wrote: > > You need <%= %> rather than <% %>. But keep in mind that what erb > > will show you is the result of evaluating the expression. The result > > of evaluating 10.times {...} is 10 -- and the result of evaluating > > puts is nil. So if you want to display all the numbers, you'd want > > something like: > > > > <%= (1..10).to_a.join(", ") %> > > > > David > > Further research shows me that on the Erb website > (http://www2a.biglobe.ne.jp/~seki/ruby/erb.html) that > > Hello <% print "world" %> > > Should give me: > > Hello world > > But this is not the case. Rather, I get worldHello. ??? Does anyone > else have this behaviour with Erb? > > -- $stdout.sync = true "Just another Ruby hacker.".each_byte do |b| ('a'..'z').step do|c|print c+"\b";sleep 0.007 end;print b.chr end; print "\n"