lib/contrast/utils/ruby_ast_rewriter.rb in contrast-agent-4.6.0 vs lib/contrast/utils/ruby_ast_rewriter.rb in contrast-agent-4.7.0

- old
+ new

@@ -1,9 +1,10 @@ # Copyright (c) 2021 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true -require 'parser/current' +return unless RUBY_VERSION < '2.6.0' # TODO: RUBY-714 remove guard w/ EOL of 2.5 +require 'parser/current' module Contrast module Utils # This utility allows us to parse and rewrite the AST in Ruby 2.5, # allowing us to track String interpolation propagation by replacing those # events with String#+ events instead.