Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not cache the struct layout in the metaclass
This caching breaks code that attempts to layout the same struct class more than once, as in struct_spec.rb's layout specs that reopen PairLayout in two successive specs. I do not think this behavior should be supported, and laying out the same struct twice should probably be an error. Doing it this way requires at least a guard on the layout value and at most repeated lookups of that layout via instance variables.
- Loading branch information