In message "[ruby-talk:9371] inspecting objects"
    on 01/01/16, Jon Aseltine <aseltine / surveyscience.net> writes:
>Is there any way to limit the recursion depth of inspect? I have a tree
>class which includes pointers to children, and inspecting one object
>causes the whole subtree to be displayed. I looked in the pickaxe book,
>but couldn't find anything relevant (other than overriding inspect
>itself).

No, there isn't.  

IMHO, `inspect' is designed to be used by the debug printer `p', and
then depth should be given as other than argument of `inspect', e.g.,
as a combination of a function to set depth and an inspector such that
follows references recursively with decreasing the depth counter.  But
such hook seems to be heavy for a simple debug printer `p'.

Any way, sometimes we have to write a tree printer.  I don't think it
is not fun.

-- Gotoken