提交 127d2c82 编写于 作者: L lest

remove check for string from request body setter

it was required on ruby 1.8
上级 893d38d7
......@@ -121,14 +121,7 @@ def body
def body=(body)
@blank = true if body == EMPTY
# Explicitly check for strings. This is *wrong* theoretically
# but if we don't check this, the performance on string bodies
# is bad on Ruby 1.8 (because strings responds to each then).
@body = if body.respond_to?(:to_str) || !body.respond_to?(:each)
[body]
else
body
end
@body = body.respond_to?(:each) ? body : [body]
end
def body_parts
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册