Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MONGOID-5816: attr_readonly leaks into sibling classes (backport for 8.1) #5920

Merged

Conversation

DarshanaVenkatesh
Copy link
Contributor

MONGOID-5816

When we have two classes A and B that are subclasses from Base, declaring attr_readonly in the context of A or B leaks that declaration into the entire class hierarchy. Currently, all classses share the same readonly attributes at the end of declaration. Fixed so that A and B inherit the read only attributes of Base but including additional readonly attributes in the subclasses is instance specific.

@DarshanaVenkatesh DarshanaVenkatesh assigned jamis and unassigned jamis Dec 13, 2024
@DarshanaVenkatesh DarshanaVenkatesh merged commit c3054b3 into mongodb:8.1-stable Dec 16, 2024
54 of 58 checks passed
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.

2 participants