Commit 1f9a2ab7 authored by Robert Speicher's avatar Robert Speicher
Browse files

Memoize result of JSON.parse in json_response

This might see a minor speedup in test cases that call this method many
times.
parent 1e494205c50f
......@@ -29,6 +29,6 @@ def api(path, user = nil)
end
def json_response
JSON.parse(response.body)
@_json_response ||= JSON.parse(response.body)
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment