Sha256: 8eb823ee72553518940a3ecaabafe0be395307344f8894cf92454e6d0d6934e0

Contents?: true

Size: 398 Bytes

Versions: 2

Compression:

Stored size: 398 Bytes

Contents

# frozen_string_literal: true

module TaintedLove
  module Validator
    class I18nLoad < Base
      def remove?(warning)
        return unless [:ReplaceYAML, :ReplaceKernel].include?(warning.replacer)

        line = warning.stack_trace.lines.first

        if line[:file]['i18n/backend/base.rb'] && line[:method].start_with?('load_')
          return true
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tainted_love-0.4.1 lib/tainted_love/validator/i18n_load.rb
tainted_love-0.4.0 lib/tainted_love/validator/i18n_load.rb