<% begin %> <% input = StringIO.new(script) %> <% output = StringIO.new %> <% binding = Object.new.send :binding %> <% begin %> <% Pry.start binding, input: input, output: output %> <%= h output.string %> <% rescue => error %>

<%= h error.class %>: <%= h error.message %>

<% error.backtrace.each do |backtrace| %>

<%= h backtrace %>

<% end %> <% end %> <% rescue => error %> <%= erb :error, locals: { error: error }, layout: false %> <% end %>