simplify capture method

This commit is contained in:
Konstantin Haase 2011-04-22 13:56:58 +02:00
parent 972558e0ad
commit 24cb84e274
1 changed files with 0 additions and 3 deletions

View File

@ -88,11 +88,8 @@ module Sinatra
capture[:slim] = "== yield(*args)"
def capture(engine, args, block)
@_out_buf, buf_was = nil, @_out_buf
eval '_buf.clear if defined? _buf', block.binding
render(engine, Sinatra::ContentFor.capture.fetch(engine), {}, :args => args, :block => block, &block)
ensure
@_out_buf = buf_was
end
def render(engine, *)