padrino/padrino-framework — pull request #1177 by ujifgc (2013-03-24 10:46:10+00:00)
Title: Fix very strange bug with form_for and capture_html

Here's some code that fails very strangely on padrino edge:

https://github.com/ujifgc/tiny

It's basically a test if a block provided for `form_for` executed twice:

```
- form_for :object, '/' do |f|
- logger << 'CAPTURE'
= 1
```

If you visit the app with padrino edge, log shows double CAPTURE.
If you appy my patch, then it's only one CAPTURE.

The bug is very strange and I fail to write any test that would catch it. Also I don't understand how

form_tag(url, settings) { capture_html(instance, &block) }

differs from

html = capture_html(instance, &block)
form_tag(url, settings) { html }

Please help me with test and maybe explanation of the patch effect.