Skip to content

Instantly share code, notes, and snippets.



Created Sep 19, 2011
What would you like to do?
ERB+Windows bug (extra newlines)
require 'erb'
arr = [1,2,3]
context = instance_eval('binding')
src = ::File.binread('')
content =, nil, '-', '@output_buffer').result(context)
print content
<%- arr.each_with_index do |c,i| -%>
<%= ' '*i %>* <%= c %>
<%- end -%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.