提交 3b8fce7b 编写于 作者: M Michael Koziarski

reasoning behind the seemingly duplicated method

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2622 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 518540a0
......@@ -125,7 +125,8 @@ class TestResponse < AbstractResponse #:nodoc:
def response_code
headers['Status'][0,3].to_i rescue 0
end
# returns a String to ensure compatibility with Net::HTTPResponse
def code
headers['Status'].to_s.split(' ')[0]
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册