Sha256: 90f827e5e503db26b1ee6893d518248e9b2a9b737ef30589752c506c0af02917
Contents?: true
Size: 475 Bytes
Versions: 15
Compression:
Stored size: 475 Bytes
Contents
# encoding: utf-8 module RuboCop module Cop module Lint # This cop checks for *return* from an *ensure* block. class EnsureReturn < Cop MSG = 'Do not return from an `ensure` block.' def on_ensure(node) _body, ensure_body = *node return unless ensure_body ensure_body.each_node(:return) do |return_node| add_offense(return_node, :expression) end end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems