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
classFoobar# <------------ `bar` is the actual first body line of this class.class << self;baz# <------------ `baz` is the actual first body line of this singleton class.deffuncputs1endendend
j-miyake
changed the title
The autocorrect for Style/TrailingBodyOnClass breaks the code when something is following an opening of singleton class
Autocorrect for Style/TrailingBodyOnClass breaks the code when body trails after singleton class definition
May 11, 2022
Related with #10617
The autocorrect for Style/TrailingBodyOnClass breaks this code
to
Expected behavior
Steps to reproduce the problem
Save the example code to example.rb, and run
RuboCop version
$ bundle exec rubocop -V 1.29.0 (using Parser 3.1.2.0, rubocop-ast 1.17.0, running on ruby 2.7.5 x86_64-darwin20) - rubocop-performance 1.13.3 - rubocop-rake 0.6.0 - rubocop-rspec 2.10.0
The text was updated successfully, but these errors were encountered: