You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…eritance`
Fixesrubocop#9627.
This PR fixes an incorrect auto-correct for `Style/StructInheritance` when
extending instance of Struct without `do` ... `end` and class body is empty.
Fixes#9627.
This PR fixes an incorrect auto-correct for `Style/StructInheritance` when
extending instance of Struct without `do` ... `end` and class body is empty.
The
Style/StructInheritance
auto-correct treats allclass _ < Struct.new
inheritance toStruct.new do; end
instead of justStruct.new
Expected behavior
If there a struct defined in the following format with an empty class body, as portrayed below:
It should be corrected to
Actual behavior
The class mentioned above is corrected to
This will cause another rubocop violation for an empty block upon running rubocop again.
Steps to reproduce the problem
Any
Struct
declared inclass
syntax with an empty body will cause this problemRuboCop version
The text was updated successfully, but these errors were encountered: