diff --git a/lib/brakeman/checks/check_sql.rb b/lib/brakeman/checks/check_sql.rb index f96c90749d6daa826f81f2b435198a56479d0abf..838a7d535e26881eb5be041fc09d3e45ed4cf285 100644 --- a/lib/brakeman/checks/check_sql.rb +++ b/lib/brakeman/checks/check_sql.rb @@ -153,6 +153,7 @@ class Brakeman::CheckSQL < Brakeman::BaseCheck # :find, # s(:arglist, s(:str, "something"))) def constantize_call? result - sexp? result[-1][1] and result[-1][1][0] == :call and result[-1][1][2] == :constantize + call = result[:call] + call? call[1] and call[1][2] == :constantize end end