Sha256: 09d047e35e58a8bbe1fc718ef4c7fab85388ef5a336b9e2db86e7c33e8489e95
Contents?: true
Size: 432 Bytes
Versions: 4
Compression:
Stored size: 432 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 if receiver.nil? && method_name == :eval add_offence(:warning, node.loc.selector, MSG) end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rubocop-0.12.0 | lib/rubocop/cop/lint/eval.rb |
rubocop-0.11.1 | lib/rubocop/cop/lint/eval.rb |
rubocop-0.11.0 | lib/rubocop/cop/lint/eval.rb |
rubocop-0.10.0 | lib/rubocop/cop/lint/eval.rb |