lib/rubocop/cop/rspec/be_eql.rb in rubocop-rspec-1.32.0 vs lib/rubocop/cop/rspec/be_eql.rb in rubocop-rspec-1.33.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
module RuboCop
module Cop
module RSpec
# Check for expectations where `be(...)` can replace `eql(...)`.
#
@@ -32,10 +34,10 @@
# `a == b`, and `b` is comparable by identity, `a` is still not
# necessarily the same type as `b` since the `#==` operator can
# coerce objects for comparison.
#
class BeEql < Cop
- MSG = 'Prefer `be` over `eql`.'.freeze
+ MSG = 'Prefer `be` over `eql`.'
def_node_matcher :eql_type_with_identity, <<-PATTERN
(send _ :to $(send nil? :eql {true false int float sym nil_type?}))
PATTERN