Method: RuboCop::Cop::Style::RedundantFreeze#on_send
- Defined in:
- lib/rubocop/cop/style/redundant_freeze.rb
#on_send(node) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/rubocop/cop/style/redundant_freeze.rb', line 20 def on_send(node) return unless node.receiver && node.method?(:freeze) && immutable_literal?(node.receiver) add_offense(node) end |