lib/darkext/io.rb in darkhelmet-darkext-0.9.4 vs lib/darkext/io.rb in darkhelmet-darkext-0.9.5

- old
+ new

@@ -1,10 +1,10 @@ require 'darkext/hash' module DarkIO # Runs a block and captures the output it generates def self.capture_output(opts = { }) # yield e - opts.with_defaults!(:stdout => true, :stderr => true) + opts.with_defaults!(:stdout => true, :stderr => false) cout,cerr = opts[:stdout],opts[:stderr] yield and return if !cout && !cerr old_stdout = STDOUT.dup if cout