I notice that ERB is still broken in Ruby 1.8.7. $ cat test.erb <% n=1 # make n equal to 1 %> something <% n=0 %> something else $ ruby -v ruby 1.8.7 (2008-06-20 patchlevel 22) [i686-darwin9.3.0] $ erb test.erb something else $ The comment in the ruby inside the <% %> seems to comment out all the non-ruby that follows, until the next <%. Compare with the old behaviour (on my other machine, but it doesn't matter): $ ruby -v ruby 1.8.6 (2007-09-24 patchlevel 111) [x86_64-linux] $ erb test.erb something something else $ - Stephen