Permalink
Browse files

SPEC: body.each yields values which to_s

Signed-off-by: Ryan Tomayko <rtomayko@gmail.com>
  • Loading branch information...
1 parent 94fde2b commit 26af7437a695872c2621beffb851671960a7595a @jeremy jeremy committed with rtomayko Apr 24, 2009
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/rack/contrib/csshttprequest.rb
  2. +1 −1 lib/rack/contrib/jsonp.rb
View
2 lib/rack/contrib/csshttprequest.rb
@@ -26,7 +26,7 @@ def chr_request?(env)
end
def encode(response, assembled_body="")
- response.each { |s| assembled_body << s } # call down the stack
+ response.each { |s| assembled_body << s.to_s } # call down the stack
return ::CSSHTTPRequest.encode(assembled_body)
end
View
2 lib/rack/contrib/jsonp.rb
@@ -33,7 +33,7 @@ def call(env)
# is returned as a full string.
#
def pad(callback, response, body = "")
- response.each{ |s| body << s }
+ response.each{ |s| body << s.to_s }
"#{callback}(#{body})"
end

0 comments on commit 26af743

Please sign in to comment.