提交 6286b63f 编写于 作者: E Emilio Tagua

Remove warings from rescues: don't define more than once debug_hash method and...

Remove warings from rescues: don't define more than once debug_hash method and ask if @response if defined.
上级 540e8725
......@@ -14,7 +14,7 @@
def debug_hash(hash)
hash.sort_by { |k, v| k.to_s }.map { |k, v| "#{k}: #{v.inspect rescue $!.message}" }.join("\n")
end
end unless self.class.method_defined?(:debug_hash)
%>
<h2 style="margin-top: 30px">Request</h2>
......@@ -28,4 +28,4 @@
<h2 style="margin-top: 30px">Response</h2>
<p><b>Headers</b>: <pre><%=h @response ? @response.headers.inspect.gsub(',', ",\n") : 'None' %></pre></p>
<p><b>Headers</b>: <pre><%=h defined?(@response) ? @response.headers.inspect.gsub(',', ",\n") : 'None' %></pre></p>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册