Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 422 Bytes

Lint-RedundantWithObject.md

File metadata and controls

35 lines (25 loc) · 422 Bytes

Pattern: Redundant with_object

Issue: -

Description

This rule checks for redundant with_object.

Examples

# bad
ary.each_with_object([]) do |v|
  v
end

# good
ary.each do |v|
  v
end

# bad
ary.each.with_object([]) do |v|
  v
end

# good
ary.each do |v|
  v
end

Further Reading