On Thu, 11 Sep 2003, Austin Ziegler wrote: > > raise "@b1 is nil" if @b1.nil > > @b1.each { |bf| > > You mean @b1.nil? -- right? Yes, didn't paste it because it was short! > > => nil > irb(main):013:0> B.new.foo > RuntimeError: @b1 is nil which is a different message... > from (irb):9:in `foo' > from (irb):13 > irb(main):014:0> > > Is there a chance that @b1 is becoming nil between your test and the each > because the program is threaded? No, single thread only. > > As far as I know, there's no way to know what variables (labels) are > referring to what values (objects). I found out what caused it: @dirs += entries.collect{|f| stuff_here(f)}.compact! The bang method caused the blow up, but even defining class Nil def to_a raise "nil.to_a() called" end end did not trap it. Where does the "#<"..."failed to convert nil to Array"...> message come from? Somewhere untrappable? > -austin > * 16.50.48 Hugh > > > > >