Sha256: fe30817ad6099c521a654ca492566db4dab40f8bffc0652c1d87a80f13560f38
Contents?: true
Size: 391 Bytes
Versions: 4
Compression:
Stored size: 391 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 add_offense(node, :selector) if receiver.nil? && method_name == :eval end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rubocop-0.22.0 | lib/rubocop/cop/lint/eval.rb |
rubocop-0.21.0 | lib/rubocop/cop/lint/eval.rb |
rubocop-0.20.1 | lib/rubocop/cop/lint/eval.rb |
rubocop-0.20.0 | lib/rubocop/cop/lint/eval.rb |