busterjs/samsam — pull request #4 by dwittner (2013-08-30 14:48:50+00:00)
Title: New version of cyclic comparison

I have completely changed the logic for comparing cyclic objects. The first approach, decycling the objects before comparison, wasn't viable for some tricky cases.

For example:

var cyclic1 = {}, cyclic2 = {};
cyclic1.ref = cyclic1;
cyclic2.ref = cyclic1;
pass("equal objects even though only one object is cyclic",
cyclic1, cyclic2);