Add Performance/BlockGivenWithExplicitBlock rule
We don't need to use `block_given?` since we specifically pass the block
parameter, particularly since we added the Style/ExplicitBlockArgument
rule in commit a102f3f0a.
This commit is contained in:
@@ -205,6 +205,9 @@ Lint/UselessAssignment:
|
|||||||
Lint/Void:
|
Lint/Void:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Performance/BlockGivenWithExplicitBlock:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Performance/CompareWithBlock:
|
Performance/CompareWithBlock:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ module Header
|
|||||||
end
|
end
|
||||||
|
|
||||||
tag.header do
|
tag.header do
|
||||||
safe_join([before, content_tag(heading_tag, title), (capture(&block) if block_given?)].compact)
|
safe_join([before, content_tag(heading_tag, title), (capture(&block) if block)].compact)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user