提交 36349c22 编写于 作者: J Justin Collins

Only convert call target to string if symbol

The only thing this is used for is matching regexes
against known call targets. We only want to store these
strings if the call target is a symbol, not a full Sexp.
Big performance improvement for large apps.
上级 87331d7e
......@@ -106,7 +106,7 @@ class Brakeman::CallIndex
def index_calls calls
calls.each do |call|
@methods << call[:method].to_s
@targets << call[:target].to_s
@targets << call[:target].to_s if call[:target].is_a? Symbol
@calls_by_method[call[:method]] << call
@calls_by_target[call[:target]] << call
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册