splitwise / super_diff

A more helpful way to view differences between complex data structures in RSpec.
https://splitwise.github.io/super_diff/
MIT License
991 stars 54 forks source link

Add handling for Data classes #259

Closed jas14 closed 2 months ago

jas14 commented 2 months ago

Closes #252.

Ruby 3.2.0 introduced the Data construct, which looks a lot like an object to this project, but uses #members instead of instance variables.

The solution is to introduce an object inspection tree builder and operation tree builder that are essentially the same as the corresponding builders for default objects, but know to read the members of the Data class instead of instance variables.