diff --git a/lib/brakeman/processors/alias_processor.rb b/lib/brakeman/processors/alias_processor.rb index 381c1e8c0e9aadc24e96a133ad6358aacb60e8d2..938ee3ba1ba53fe83094cebc3b6b388a81a62c3c 100644 --- a/lib/brakeman/processors/alias_processor.rb +++ b/lib/brakeman/processors/alias_processor.rb @@ -450,11 +450,11 @@ class Brakeman::AliasProcessor < Brakeman::SexpProcessor # #Returns the value inside the array, if possible. def process_array_access target, args - if args.length == 1 and integer? args[0] - index = args[0][1] + if args.length == 1 and integer? args.first + index = args.first.value #Have to do this because first element is :array and we have to skip it - target[1..-1][index + 1] + target[1..-1][index] else nil end