Closed mcmire closed 5 years ago
Not sure this is really necessary, actually. There's a good reason we don't show the object id in the diff: because they're different between the two objects. Closing for now.
Well, actually, there is an inconsistency here. As you can see here, when the diff formatter spits out an object, it displays instance variables as though they are attributes. However, the deep inspector shows them more as PrettyPrinter would:
Fixed in 89b7b776fd3ce13cc31d0a20dba172dc6b81a411.
Currently we use a different algorithm to inspect two complex objects on a single line and then generate a diff of those objects. Here is a good example of this:
In this case, "Expected" vs "Actual" uses deep inspection to generate an inspection of the two objects, whereas the diff uses an entirely different algorithm. Thus, you get
SuperDiff::Test::Player:0x7fcdb0a77440
vsSuperDiff::Test::Player
. Maybe there's a way we can make use of the pretty printing algorithm to generate a diff?