Created
May 4, 2010 02:31
-
-
Save machu/388875 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/tdiary/dispatcher.rb b/core/tdiary/dispatcher.rb | |
index be54430..974a982 100644 | |
--- a/core/tdiary/dispatcher.rb | |
+++ b/core/tdiary/dispatcher.rb | |
@@ -204,11 +204,11 @@ module TDiary | |
@target = TARGET[target] | |
end | |
- def dispatch_cgi( cgi = CGI.new, stdout = STDOUT, stderr = STDERR ) | |
+ def dispatch_cgi( cgi = CGI.new, stdout = nil, stderr = nil ) | |
stdout_orig = $stdout;stderr_orig = $stderr | |
begin | |
- $stdout = stdout | |
- $stderr = stderr | |
+ $stdout = stdout if stdout | |
+ $stderr = stderr if stderr | |
@target.run( cgi ) | |
ensure | |
$stdout = stdout_orig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment