lib/rubocop/cop/lint/safe_navigation_chain.rb in rubocop-1.29.1 vs lib/rubocop/cop/lint/safe_navigation_chain.rb in rubocop-1.30.0
- old
+ new
@@ -23,9 +23,12 @@
#
# x&.foo&.bar
# x&.foo || bar
class SafeNavigationChain < Base
include NilMethods
+ extend TargetRubyVersion
+
+ minimum_target_ruby_version 2.3
MSG = 'Do not chain ordinary method call after safe navigation operator.'
# @!method bad_method?(node)
def_node_matcher :bad_method?, <<~PATTERN