提交 1f9a2ab7 编写于 作者: R Robert Speicher

Memoize result of JSON.parse in json_response

This might see a minor speedup in test cases that call this method many
times.
上级 33df3ed3
......@@ -29,6 +29,6 @@ module ApiHelpers
end
def json_response
JSON.parse(response.body)
@_json_response ||= JSON.parse(response.body)
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册