lib/brakeman/processors/alias_processor.rb in brakeman-lib-4.10.0 vs lib/brakeman/processors/alias_processor.rb in brakeman-lib-4.10.1
- old
+ new
@@ -234,11 +234,11 @@
if string? target and string? first_arg
target.value << first_arg.value
env[target_var] = target
return target
elsif string? target and string_interp? first_arg
- exp = Sexp.new(:dstr, target.value + first_arg[1]).concat(first_arg[2..-1])
+ exp = Sexp.new(:dstr, target.value + first_arg[1]).concat(first_arg.sexp_body(2))
env[target_var] = exp
elsif string? first_arg and string_interp? target
if string? target.last
target.last.value << first_arg.value
elsif target.last.is_a? String
@@ -939,10 +939,10 @@
return unless symbol? first_arg or string? first_arg
exp.method = first_arg.value.to_sym
args = exp.args
exp.pop # remove last arg
if args.length > 1
- exp.arglist = args[1..-1]
+ exp.arglist = args.sexp_body
end
end
#Returns a new SexpProcessor::Environment containing only instance variables.
#This is useful, for example, when processing views.