Automatic Ruby code style checking tool. Aims to enforce the community-driven Ruby Style Guide.

Critical or Security advisories for 0.51.0

This version doesn't have any advisory. Want to report one?

Changelog for 0.51.0

New features

Bug fixes

  • #3312: Make Rails/Date Correct false positive on #to_time for strings ending in UTC-"Z".(@erikdstock)
  • #4741: Make Style/SafeNavigation correctly exclude methods called without dot. (@drenmi)
  • #4740: Make Lint/RescueWithoutErrorClass aware of modifier form rescue. (@drenmi)
  • #4745: Make Style/SafeNavigation ignore negated continuations. (@drenmi)
  • #4732: Prevent Performance/HashEachMethods from registering an offense when #each follows #to_a. (@drenmi)
  • #4730: False positive on Lint/InterpolationCheck. (@koic)
  • #4751: Prevent Rails/HasManyOrHasOneDependent cop from registering offense if :through option was specified. (@smakagon)
  • #4737: Fix ReturnInVoidContext cop when return is in top scope. (@frodsan)
  • #4776: Non utf-8 magic encoding comments are now respected. (@deivid-rodriguez)
  • #4241: Prevent Rails/Blank and Rails/Present from breaking when there is no explicit receiver. (@rrosenblum)
  • #4814: Prevent Rails/Blank from breaking on send with an argument. (@pocke)
  • #4759: Make Naming/HeredocDelimiterNaming and Naming/HeredocDelimiterCase aware of more delimiter patterns. (@drenmi)
  • #4823: Make Lint/UnusedMethodArgument and Lint/UnusedBlockArgument aware of overriding assignments. (@akhramov)
  • #4830: Prevent Lint/BooleanSymbol from truncating symbol's value in the message when offense is located in the new syntax hash. (@akhramov)
  • #4747: Fix Rails/HasManyOrHasOneDependent cop incorrectly flags with_options blocks. (@koic)
  • #4836: Make Rails/OutputSafety aware of safe navigation operator. (@drenmi)
  • #4843: Make Lint/ShadowedException cop aware of same system error code. (@koic)
  • #4757: Make Style/TrailingUnderscoreVariable work for nested assignments. (@donjar)
  • #4597: Fix Style/StringLiterals cop not registering an offense on single quoted strings containing an escaped single quote when configured to use double quotes. (@promisedlandt)
  • #4850: Lint/UnusedMethodArgument respects IgnoreEmptyMethods setting by ignoring unused method arguments for singleton methods. (@jmks)
  • #2040: Document how to write a custom cop. (@jonatas)


  • #4746: The Lint/InvalidCharacterLiteral cop has been removed since it was never being actually triggered. (@deivid-rodriguez)
  • #4789: Analyzing code that needs to support MRI 1.9 is no longer supported. (@deivid-rodriguez)
  • #4582: Severity and other common parameters can be configured on department level. (@jonas054)
  • #4787: Analyzing code that needs to support MRI 2.0 is no longer supported. (@deivid-rodriguez)
  • #4787: RuboCop no longer installs on MRI 2.0. (@deivid-rodriguez)
  • #4266: Download the inherited config files of a remote file from the same remote. (@tdeo)
  • #4853: Make Lint/LiteralInCondition cop aware of ! and not. (@pocke)
  • #4864: Rename Lint/LiteralInCondition to Lint/LiteralAsCondition. (@pocke)

Dependencies for 0.51.0

Name Requirement Status
~> 1.10

< 3.0, >=

~> 0.1

< 3.0, >= 2.2.2

~> 1.7

>= 1.0.1, ~> 1.0

My projects using rubocop

Name Locked version Requirement
You should be logged in to see which of your projects use rubocop.