Sha256: 2167ec5ff11c1ae1f1bd501008903f8e1e252a740d01480cdd611d0d53cf92f4

Contents?: true

Size: 385 Bytes

Versions: 5

Compression:

Stored size: 385 Bytes

Contents

# encoding: utf-8

module Rubocop
  module Cop
    module Lint
      # This cop checks for the use of *Kernel#eval*.
      class Eval < Cop
        MSG = 'The use of eval is a serious security risk.'

        def on_send(node)
          receiver, method_name, = *node

          warning(node, :selector) if receiver.nil? && method_name == :eval
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubocop-0.15.0 lib/rubocop/cop/lint/eval.rb
rubocop-0.14.1 lib/rubocop/cop/lint/eval.rb
rubocop-0.14.0 lib/rubocop/cop/lint/eval.rb
rubocop-0.13.1 lib/rubocop/cop/lint/eval.rb
rubocop-0.13.0 lib/rubocop/cop/lint/eval.rb