Bug #18534
rubocop not configured for Ruby 2.0, suggests using 2.3 safe navigation operator
Description
rubocop 0.43+ is recommending the safe navigation operator from Ruby 2.3 be used in a number of sources files when running on Ruby 2.3, e.g.
$ be rubocop lib/ws_proxy.rb Inspecting 1 file C Offenses: lib/ws_proxy.rb:33:5: C: Use safe navigation (&.) instead of checking if an object exists before calling the method. socket.close unless socket.nil? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 file inspected, 1 offense detected
It should be configured for Ruby 2.0 compatibility.
Related issues
Associated revisions
History
#1
Updated by Dominic Cleal over 5 years ago
- Related to Bug #17796: Disable cop: Rails/HttpPositionalArguments added
#2
Updated by The Foreman Bot over 5 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/4293 added
#3
Updated by Dominic Cleal over 5 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset d89db8e23356166ef2c9441e5170be314bb18120.
#4
Updated by Dominic Cleal over 5 years ago
- Legacy Backlogs Release (now unused) set to 209
fixes #18534 - configure rubocop for Ruby 2.0 compatibility