lib/brakeman/processors/alias_processor.rb in brakeman-4.5.1 vs lib/brakeman/processors/alias_processor.rb in brakeman-4.6.0

- old
+ new

@@ -263,10 +263,14 @@ end when :freeze unless target.nil? exp = target end + when :dup + unless target.nil? + exp = target + end when :join if array? target and target.length > 2 and (string? first_arg or first_arg.nil?) exp = process_array_join(target, first_arg) end when :! @@ -600,10 +604,10 @@ # Handle { **kw } if node_type? exp, :hash if exp.any? { |e| node_type? e, :kwsplat and node_type? e.value, :hash } kwsplats, rest = exp.partition { |e| node_type? e, :kwsplat and node_type? e.value, :hash } - exp = Sexp.new.concat(rest).line(exp) + exp = Sexp.new.concat(rest).line(exp.line) kwsplats.each do |e| exp = process_hash_merge! exp, e.value end end