From: Brian Candler Date: 2009-10-25T19:37:25+09:00 Subject: Re: erb:how to make less % ? Another option to look at is StringIO, so that you keep IO-like methods such as "puts". You could also wrap _erbout this way: $ irb --simple-prompt >> require 'erb' => true >> require 'stringio' => true >> ERB.new(<<'EOS').result(binding) <% out = StringIO.new(_erbout) %> <% 3.times do out.puts rand end %> EOS => "0.761865648122361\n0.792800150151016\n0.683615203721222\n\n" >> -- Posted via http://www.ruby-forum.com/.