Skip to content

Style/FrozenStringLiteralComment should not be considered as safe for autocorrection #7287

Closed
@johnvuko

Description

@johnvuko

Hi,
I think Style/FrozenStringLiteralComment should not be considered as safe for autocorrection.

For example:

my_string = 'foo'
my_string << 'will crash with frozen_string_literal'

This code will crash with an error can't modify frozen String (FrozenError).

Regards,
John

Activity

buehmann

buehmann commented on Aug 23, 2019

@buehmann
Contributor

Thanks, I opened a pull request for this: #7307

added a commit that references this issue on Jan 2, 2020

[Fix #7287] FrozenStringLiteralComment is unsafe

1d0b497
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @johnvuko@buehmann@Drenmi

      Issue actions

        Style/FrozenStringLiteralComment should not be considered as safe for autocorrection · Issue #7287 · rubocop/rubocop