sinatra/sinatra — pull request #388 by nbaum (2011-10-14 15:39:35+00:00)
Title: Don't leave @default_layout set to false if rendering a template fails

@default_layout is set to false during the part of Templates#render which actually invokes the template, but is only set back to its original value if the invocation was successful. This has has the result that if the template fails but the application later tries to render a different template in the same request, those templates won't have layouts.