From: "Dmitry V. Sabanin" Date: 2004-07-30T20:40:55+09:00 Subject: Re: defined? in ruby-1.9 On Friday 30 July 2004 16:31, Robert Klemme wrote: > "Dmitry V. Sabanin" schrieb im Newsbeitrag > news:200407301527.31849.sdmitry@lrn.ru... > > > On Friday 30 July 2004 15:06, Robert Klemme wrote: > > > "Dmitry V. Sabanin" schrieb im Newsbeitrag > > > news:200407301222.10852.sdmitry@lrn.ru... > > > > > > > Hi, > > > > > > > > Lately I was converting some of my projects to ruby 1.9, and I found > > > > > > that this code is no longer working: > > > > raise if defined?(Test::Unit) > > > > > > I guess you intended to write > > > > > > raise unless defined? Test::Unit > > > > Well, no.. this code is used in exception-catching framework, so the > > point is to re-raise exception > > > if code is used for tests or to log it if it's in standalone use. > > You have test specific code in production code? That sounds odd at > minimum. Care to uncover some more details? I agree, but there's no other way to test modules for my web-framework, because it manages exceptions raised in modules by itself. And the only test specific option in production code I have is that line :) > Regards > robert -- sdmitry -=- Dmitry V. Sabanin MuraveyLabs. Spam Here -> postmaster@sco.com