New features
Performance/TimesMap
cop can auto-correct. (@lumeet)Style/ZeroLengthPredicate
cop can auto-correct. (@lumeet)- #2828:
Style/ConditionalAssignment
is now configurable to enforce assignment inside of conditions or to enforce assignment to conditions. (@rrosenblum) - #2862:
Performance/Detect
andPerformance/Count
have a new configurationSafeMode
that is defaulted totrue
. These cops have known issues withRails
and other ORM frameworks. With this default configuration, these cops will not run if theRails
cops are enabled. (@rrosenblum) Style/IfUnlessModifierOfIfUnless
cop added. (@amuino)
Bug fixes
- #2948:
Style/SpaceAroundKeyword
should allow yield[n] and super[n]. (@laurelfan) - #2950: Fix auto-correcting cases in which precedence has changed in
Style/OneLineConditional
. (@lumeet) - #2947: Fix auto-correcting
if-then
inStyle/Next
. (@lumeet) - #2904:
Style/RedundantParentheses
doesn't flag-(1.method)
or+(1.method)
, since removing the parentheses would change the meaning of these expressions. (@alexdowad) - #2958:
Style/MultilineMethodCallIndentation
doesn't fail when inspecting unary ops which span multiple lines. (@alexdowad) - #2959:
Lint/LiteralInInterpolation
doesn't report offenses for iranges and eranges with non-literal endpoints. (@alexdowad) - #2960:
Lint/AssignmentInCondition
catches method assignments (likeobj.attr = val
) in a condition. (@alexdowad) - #2871: Second solution for possible encoding incompatibility when outputting an HTML report. (@jonas054)
- #2967: Fix auto-correcting of
===
,<=
, and>=
inStyle/ConditionalAssignment
. (@rrosenblum) - #2977: Fix auto-correcting of
"#{$!}"
inStyle/SpecialGlobalVars
. (@lumeet) - #2935: Make configuration loading work if
SafeYAML.load
is private. (@jonas054)
Changes
require:
only does relative includes when it starts with a.
. (@ptarjan)Style/IfUnlessModifier
does not trigger if the body is another conditional. (@amuino)- #2963:
Performance/RedundantMerge
will now register an offense inside ofeach_with_object
. (@rrosenblum)