Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update spec for cyclic references in Set#inspect / Set#to_s
The old version did only check a depth of 1. The following pseudocode would pass that test (if the head and tail of the inspect string were added to it): map { |item| item == self ? "#<Set: {...}>" : item.inspect } Any deeper level of cyclic references would cause an infinite loop in this code. This changes explicitly adds the deeper cycles to the spec.
- Loading branch information