Bug fixes
- Fix auto-correction of array and hash literals in
Lint/LiteralInInterpolation
. (@lumeet) - #2815: Fix missing assets for html formatter. (@prsimp)
Style/RedundantParentheses
catches offenses involving the 2nd argument to a method call without parentheses, if the 2nd argument is a hash. (@alexdowad)Style/RedundantParentheses
catches offenses inside an array literal. (@alexdowad)Style/RedundantParentheses
doesn't flagmethod (:arg) {}
, since removing the parentheses would change the meaning of the expression. (@alexdowad)Performance/Detect
doesn't flag code wherefirst
orlast
takes an argument, as it cannot be transformed to equivalent code usingdetect
. (@alexdowad)Style/SpaceAroundOperators
ignores aref assignments. (@alexdowad)Style/RescueModifier
indents code correctly when auto-correcting. (@alexdowad)Style/RedundantMerge
indents code correctly when auto-correcting, even if the corrected hash had multiple keys, and even if the corrected code was indented to start with. (@alexdowad)- #2831:
Performance/RedundantMerge
doesn't break code by autocorrecting a#merge!
call which occurs at tail position in a block. (@alexdowad)
Changes
- Handle auto-correction of nested interpolations in
Lint/LiteralInInterpolation
. (@lumeet) - RuboCop results cache uses different directory names when there are many (or long) CLI options, to avoid a very long path which could cause failures on some filesystems. (@alexdowad)