Skip to content

Fix "can't modify frozen array" exception under certain conditions#2999

Merged
mshibuya merged 3 commits into
railsadminteam:masterfrom
rs-pro:master
May 3, 2018
Merged

Fix "can't modify frozen array" exception under certain conditions#2999
mshibuya merged 3 commits into
railsadminteam:masterfrom
rs-pro:master

Conversation

@glebtv

@glebtv glebtv commented Mar 7, 2018

Copy link
Copy Markdown
Contributor

This fixes "can't modify frozen array" exception which occurs for me in development in many real-world apps.

It happens when @_fields is returned from HasFields#fields and then it is being frozen when assigning it to @_ro_fields.

The spec included is as close as I could get it to my use-case (real app does not need to add a new field type, any change to code that causes my app to reload triggers this exception)

@fmh

fmh commented Mar 8, 2018

Copy link
Copy Markdown
Contributor

👍

@mshibuya mshibuya merged commit 37aa038 into railsadminteam:master May 3, 2018
@mshibuya

mshibuya commented May 3, 2018

Copy link
Copy Markdown
Member

Looks good, thanks!

@AnatolyShirykalov AnatolyShirykalov mentioned this pull request Jul 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants