Skip to content

Commit e43490e

Browse files
committed
Fix current RuboCop offense
Autocorrect would have been `node.true_type? || node` but I don't think that preserves the intention ``` $ bundle exec rubocop Inspecting 278 files ........................................................................................................................................C............................................................................................................................................. Offenses: lib/rubocop/rspec/hook.rb:67:25: C: [Correctable] Style/RedundantCondition: Use double pipes || instead. node.true_type? ? true : node ^^^^^^^^ 278 files inspected, 1 offense detected, 1 offense autocorrectable ```
1 parent 6fca833 commit e43490e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/rubocop/rspec/hook.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ def transform_metadata(meta)
6464
end
6565

6666
def transform_true(node)
67-
node.true_type? ? true : node
67+
return true if node.true_type?
68+
69+
node
6870
end
6971

7072
def scope_name

0 commit comments

Comments
 (0)