From: Daniel Vartanov Date: 2009-02-03T20:19:49+09:00 Subject: Event-based stdout content capturing Some legacy code produces output to STDOUT during execution. I need to capture it on even-based model, something like the following: capture the_legacy_code_lambda do |content| # do something with content each time something appears in STDOUT end how can I manage this? Are there any idioms?