From 4ce16d1f7cce8de9dc2bc4f4a981c740f793cce1 Mon Sep 17 00:00:00 2001 From: Justin Collins Date: Thu, 2 Feb 2012 10:57:31 -0800 Subject: [PATCH] Handle errors when using class_name in FindAllCalls fixes #42 --- lib/brakeman/processors/lib/find_all_calls.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/brakeman/processors/lib/find_all_calls.rb b/lib/brakeman/processors/lib/find_all_calls.rb index 1d3dfa26..303c6416 100644 --- a/lib/brakeman/processors/lib/find_all_calls.rb +++ b/lib/brakeman/processors/lib/find_all_calls.rb @@ -120,7 +120,11 @@ class Brakeman::FindAllCalls < Brakeman::BaseProcessor when :lit exp[1] when :colon2 - class_name exp + begin + class_name exp + rescue StandardError + exp + end when :self @current_class || @current_module || nil else -- GitLab