Bug fixes
- #15408: Fix a crash for
Bundler/GemCommentwith a non-literal gem option key. (@bbatsov) - #9571: Fix a crash for
Layout/ClassStructurewhen a class body is a single safe-navigation call (e.g.test&.private_methods(def foo; end)). (@bbatsov) - #15413: Fix a crash for
Gemspec/DevelopmentDependencieswhenAllowedGemsis nil. (@bbatsov) - #15404: Fix a crash for
Metrics/MethodLengthwith an anonymousdefine_method. (@bbatsov) - #15414: Fix a crash for
Naming/InclusiveLanguagewith nil or emptyFlaggedTerms. (@bbatsov) - #15405: Fix a crash for
Security/IoMethodswith a non-string-literal argument. (@bbatsov) - #15330: Fix a crash for
Style/EmptyStringInsideInterpolationwith a modifier conditional. (@bbatsov) - #15351: Fix a crash for
Style/OpenStructUsewith a bareOpenStructroot node. (@bbatsov) - #15379: Fix a crash for
Style/TrailingUnderscoreVariablewhen a nested destructuring group consists only of underscore variables. (@bbatsov) - #15412: Fix a false negative for
Security/MarshalLoadwith a proc argument. (@bbatsov) - #15386: Fix a false negative for
Style/MethodDefParentheseswith named rest arguments underEnforcedStyle: require_no_parentheses. (@bbatsov) - #15396: Fix a false negative for
Style/MultilineMethodSignaturewhere a signature that fits on one line was skipped because the multi-line source length was measured instead of the collapsed width. (@bbatsov) - #15386: Fix a false negative for
Style/OptionalArgumentswith singleton methods. (@bbatsov) - #15383: Fix a false negative for
Style/RedundantFilterChainwith numbered-parameter blocks. (@bbatsov) - #15290: Fix a false negative for
Lint/ToEnumArgumentswhen a braced hash is passed to keyword parameters (e.g.to_enum(:m, { required: required })), which raisesArgumentErrorwhen the enumerator is used. (@RedZapdos123) - #11956: Fix a false positive for
Naming/FileNamewhen a class or module name contains multiple consecutiveAllowedAcronyms. (@camallen) - #15324: Fix a false positive for
Style/DirEmptywith a block. (@bbatsov) - #15326: Fix a false positive for
Style/EmptyLiteralwith numbered anditblock parameters. (@bbatsov) - #15335: Fix a false positive for
Style/EnvHome. (@bbatsov) - #15345: Fix a false positive for
Style/InlineCommentwithrubocop:tododirectives. (@bbatsov) - #15348: Fix a false positive for
Style/MultilineIfThen. (@bbatsov) - #15383: Fix a false positive for
Style/NumericPredicatewhen an allowed method encloses a numbered-parameter oritblock. (@bbatsov) - #15389: Fix a false positive for
Style/OptionHashwhen the options hash is forwarded with an explicitsuper. (@bbatsov) - #15350: Fix a false positive for
Style/RedundantFormatwith a lone format sequence. (@bbatsov) - #15374: Fix a false positive for
Style/RedundantSelfwith a rescue exception variable. (@bbatsov) - #15376: Fix a false positive for
Style/Semicolonwith a semicolon inside a string literal. (@bbatsov) - #15398: Fix an incorrect autocorrect for
Layout/ConditionPositionthat dropped a body statement sharing the condition's line via a semicolon. (@bbatsov) - #15399: Fix an incorrect autocorrect for
Layout/EmptyCommentthat deleted a heredoc when removing an empty comment trailing its opener. (@bbatsov) - #15400: Fix an incorrect autocorrect for
Layout/EmptyLineBetweenDefsthat inserted a blank line inside a heredoc body when an endless method's body was a heredoc. (@bbatsov) - #15401: Fix an incorrect autocorrect for
Layout/SpaceAroundOperatorsthat turned**=and/=compound assignments into**//, dropping the assignment. (@bbatsov) - #15406: Fix an incorrect autocorrect for
Naming/MemoizedInstanceVariableName. (@bbatsov) - #15411: Fix an incorrect autocorrect for
Naming/RescuedExceptionsVariableName. (@bbatsov) - #15319: Fix an incorrect autocorrect for
Style/DataInheritancewith a brace block. (@bbatsov) - #15323: Fix an incorrect autocorrect for
Style/EmptyCaseConditionas ayield/superargument. (@bbatsov) - #15323: Fix an incorrect autocorrect for
Style/EmptyCaseConditionwith low-precedencewhenvalues. (@bbatsov) - #15322: Fix an incorrect autocorrect for
Style/EmptyClassDefinitionwith a namespaced constant. (@bbatsov) - #15336: Fix an incorrect autocorrect for
Style/EmptyHeredoc. (@bbatsov) - #15332: Fix an incorrect autocorrect for
Style/EvenOdd. (@bbatsov) - #15329: Fix an incorrect autocorrect for
Style/ExactRegexpMatchwith a single quote. (@bbatsov) - #15333: Fix an incorrect autocorrect for
Style/FileNull. (@bbatsov) - #15334: Fix an incorrect autocorrect for
Style/For. (@bbatsov) - #15331: Fix an incorrect autocorrect for
Style/FormatStringwith a low-precedence argument. (@bbatsov) - #15331: Fix an incorrect autocorrect for
Style/FormatStringwith a splat argument. (@bbatsov) - #15337: Fix an incorrect autocorrect for
Style/HashSlice. (@bbatsov) - #15327: Fix an incorrect autocorrect for
Style/HashSyntaxwith a multi-pair bracelessreturn. (@bbatsov) - #15368: Fix an incorrect autocorrect for
Style/IfWithSemicolonthat changed semantics when the condition was an assignment, by parenthesizing it in the resulting ternary. (@bbatsov) - #15340: Fix an incorrect autocorrect for
Style/KeywordArgumentsMergingwith a block-pass argument. (@bbatsov) - #15387: Fix an incorrect autocorrect for
Style/KeywordParametersOrderthat inserted a spurious blank line when a keyword optional parameter already trailed the parameters list. (@bbatsov) - #15341: Fix an incorrect autocorrect for
Style/MapIntoArraywith a block-pass argument. (@bbatsov) - #15342: Fix an incorrect autocorrect for
Style/MethodCallWithoutArgsParentheseswithit()in a numbered block. (@bbatsov) - #15343: Fix an incorrect autocorrect for
Style/MinMaxComparisonwithunless. (@bbatsov) - #15348: Fix an incorrect autocorrect for
Style/MultilineMemoizationwithrescue/ensure. (@bbatsov) - #15348: Fix an incorrect autocorrect for
Style/MultilineMethodSignature. (@bbatsov) - #15394: Fix an incorrect autocorrect for
Style/NilLambdawhen a non-lambda proc returnsnilwithreturn. (@bbatsov) - #15352: Fix an incorrect autocorrect for
Style/ParallelAssignmentwith a%ielement needing quoting. (@bbatsov) - #15352: Fix an incorrect autocorrect for
Style/ParallelAssignmentwith a%welement needing escaping. (@bbatsov) - #15366: Fix an incorrect autocorrect for
Style/PercentLiteralDelimitersthat produced invalid Ruby for a%ssymbol whose content contains the preferred delimiter. (@bbatsov) - #15370: Fix an incorrect autocorrect for
Style/PerlBackrefsthat rewrote$+/$LAST_PAREN_MATCHto the non-equivalentRegexp.last_match(-1); these are no longer flagged. (@bbatsov) - #15371: Fix an incorrect autocorrect for
Style/RedundantExceptionthat changed the exception message when raisingRuntimeErrorwith anilmessage. (@bbatsov) - #15350: Fix an incorrect autocorrect for
Style/RedundantFormatwith anilargument. (@bbatsov) - #15365: Fix an incorrect autocorrect for
Style/RedundantLineContinuationthat corrupted an earlier line when removing a line continuation at the end of a multi-line file. (@bbatsov) - #15373: Fix an incorrect autocorrect for
Style/RedundantRegexpEscapethat stripped a necessary\@/\$escape after#in%r{}/%r//literals, enabling unintended interpolation. (@bbatsov) - #15375: Fix an incorrect autocorrect for
Style/RedundantStructKeywordInitwhenkeyword_initis not the last pair. (@bbatsov) - #15377: Fix an incorrect autocorrect for
Style/SingleLineDoEndBlockwhen the block body contains a heredoc. (@bbatsov) - #15378: Fix an incorrect autocorrect for
Style/StringHashKeyswhen the hash key is a heredoc. (@bbatsov) - #15380: Fix an incorrect autocorrect for
Style/TernaryParentheseswhen the condition is a modifierif/unlessexpression. (@bbatsov) - #15407: Fix an infinite loop for
Gemspec/RequireMFAwith multiple specifications. (@bbatsov) - #15356: Fix an infinite loop between
Lint/AssignmentInConditionandStyle/RedundantParentheseswhen an assignment is a statement of a multi-statementbeginin a condition. (@koic) - #14370: Fix comment duplication for
Style/AccessorGroupingwith a single-line trailing comment. (@bbatsov) - #15318: Fix
--fail-fastnot reporting offenses and exiting with a zero status when offenses are found. (@koic) - #15312: Fix false positives for
Layout/BlockAlignmentwhenEnforcedStyleAlignWith: start_of_blockis used anddois on a continuation line of a parenthesisless multiline method call. (@koic) - #15339: Fix incorrect autocorrects for
Style/HashTransformKeysandStyle/HashTransformValueswith a splat. (@bbatsov) - #15344: Fix incorrect autocorrects for
Style/Lambdawith block-local arguments. (@bbatsov) - #15311: Fix a false negative for
Layout/IndentationWidthwhen the body of a multiline grouped expression in parentheses is not indented. (@koic) - #15302: Fix an incorrect autocorrect for
Bundler/OrderedGemsandGemspec/OrderedDependencieswhen the last declaration has no trailing newline, which joined two declarations into a single line. (@koic) - #15307: Fix a false positive for
Lint/UnescapedBracketInRegexpwhen a character class starts with a bare](e.g./[^]]/). (@koic)