From: konsu Date: 2006-02-14T03:08:25+09:00 Subject: Re: inspecting cyclic structures please disregard this, it seems to work outside irb too. in still outputs too much stuff in my case but it still does not loop forever. konstantin "konsu" wrote in message news:99GdnSW6bqFtW23eRVn-jQ@kallback.com... > hello, > > is there a way to inspect an object only to a given depth to avoid > infinite loops in case of referential loops? like irb does: > > irb(main):001:0> a = Object.new > => # > irb(main):002:0> b = Object.new > => # > irb(main):003:0> a.instance_variable_set(:@b, b) > => # > irb(main):004:0> b.instance_variable_set(:@a, a) > => #>> > irb(main):005:0> a.inspect > => "#>>" > irb(main):006:0> > > thanks > konstantin >