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
The code I wrote in the “step to reproduce” should not be flagged as a violation.
Actual behavior
The code I wrote in the “step to reproduce” section is flagged by Layout/EmptyLinesAfterModuleInclusion.
When I follow its suggestion and add a blank line after prepend Module.new do, it then causes a Layout/EmptyLinesAroundBlockBody violation.
Steps to reproduce the problem
rubocop --enable-pending-cops
# frozen_string_literal: true# class C documentclassCprependModule.newdodeffooputs'foo'superendendend
RuboCop version
1.79.0 (using Parser 3.3.9.0, rubocop-ast 1.46.0, analyzing as Ruby 2.7, running on ruby 3.4.5) [arm64-darwin24]