| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
When a module is prepended into another module, there's no subclass relationship for normal down-hierarchy invalidation. Instead, we actively invalidate the origin module's including hierarchies as well as classes down the hierarchy. Fixes jruby#9589
For jruby#9589, we discovered that modules with prepends did not properly invalidate class hierarchies they have been included into, due to the method table being moved to the prepend shim and only invalidating along that hierarchy. This spec tests that such a module continues to invalidate included hierarchies when its method table is modified.
| Back | FazBrowse Home | New Git URL |
When a module is prepended into another module, there's no subclass relationship for normal down-hierarchy invalidation. Instead, we actively invalidate the origin module's including hierarchies as well as classes down the hierarchy.
PrependedModule becomes the new location for the origin's method table, so when it is updated the origin must also be invalidated.
There's probably too much complexity here and this might be fixable by also moving the included hierarchies into the PrependedModule, but I did not validate that all places updating this hierarchy are aware of the methodLocation. An audit of this logic should probably happen at some point, and PrependedModule might be better renamed to RelocatedClassGuts but with a better name, to indicate that it is now the new location for the origin's state. That work is out of scope for this quick fix.
Fixes #9589
Draft until specs are added.