lib/brakeman/processors/alias_processor.rb in brakeman-1.9.3 vs lib/brakeman/processors/alias_processor.rb in brakeman-1.9.4
- old
+ new
@@ -61,11 +61,11 @@
@tracker.error err if @tracker
end
#Generic replace
if replacement = env[exp] and not duplicate? replacement
- result = set_line replacement.deep_clone, exp.line
+ result = replacement.deep_clone(exp.line)
else
result = exp
end
@exp_context.pop
@@ -576,23 +576,9 @@
meth_env[Sexp.new(:lvar, arg)] = args[index - 1]
end
end
meth_env
- end
-
- #Set line nunber for +exp+ and every Sexp it contains. Used when replacing
- #expressions, so warnings indicate the correct line.
- def set_line exp, line_number
- if sexp? exp
- exp.original_line(exp.original_line || exp.line)
- exp.line line_number
- exp.each do |e|
- set_line e, line_number
- end
- end
-
- exp
end
#Finds the inner most call target which is not the target of a call to <<
def find_push_target exp
if call? exp and exp.method == :<<