Skip to content

Annotate no longer works with Rails 5.2 models #538

@kieraneglin

Description

@kieraneglin

On Rails 5.1, annotate worked as expected. After updating to 5.2, I noticed that annotate was not working as part of my post-update functionality testing.

I have no frozen string literal comments in my models.

Sample output:

Warning: exception can't modify frozen String raised while trying to load model class app/models/user.rb
Unable to annotate app/models/game.rb: can't modify frozen String
Unable to annotate app/models/game.rb: no implicit conversion of nil into Array
Unable to annotate app/models/user.rb: can't modify frozen String
Unable to annotate app/models/user.rb: no implicit conversion of nil into Array
Model files unchanged.

I'm unsure if this affects anything except models, since that's the only functionality I'm using.

Versions
Rails: 5.2.0.beta2
Ruby: 2.4.2
Annotate: 2.7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions