<% begin %> <% b = binding %> <% script.each_line do |line| %> <% next if line.strip.empty? %>

> <%= h line %>

<% begin %> <% result = b.eval(line).inspect %>

=> <%= h result %>

<% rescue => error %>

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

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