Created
January 11, 2009 21:41
This file contains 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/merb-core/lib/merb-core/rack/stream_wrapper.rb b/merb-core/lib/merb-core/rack/stream_wrapper.rb | |
index d11a141..ec6ce2c 100644 | |
--- a/merb-core/lib/merb-core/rack/stream_wrapper.rb | |
+++ b/merb-core/lib/merb-core/rack/stream_wrapper.rb | |
@@ -14,8 +14,10 @@ module Merb | |
@body.call(self) | |
elsif @body.is_a?(String) | |
@body.each_line(&callback) | |
- else | |
+ elsif @body.respond_to?(:each) | |
@body.each(&callback) | |
+ else | |
+ callback.call(@body.to_s) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment