Pattern: Use of Array.new
/Hash.new
/String.new
Issue: -
This rule checks for the use of a method, the result of which would be a literal, like an empty array, hash or string.
# bad
arr = Array.new
hash = Hash.new
# good
arr = []
arr = Array.new(10)
hash = {}
hash = Hash.new(0)