It is not safe to autocorrect foo.class.name == 'Bar' to foo.instance_of?(::Bar) because ::Bar may not be defined.
Expected behavior
The Style/ClassEqualityComparison cop autocorrect shouldn't be marked as safe because the autocorrected code may cause NameError.
Actual behavior
foo.class.name == 'Bar' is autocorrected to foo.instance_of?(::Bar).
Steps to reproduce the problem
Create a file with foo.class.name == 'Bar' and run rubocop -a.
RuboCop version
1.55.1