From: Joel VanderWerf Date: 2003-01-24T04:40:38+09:00 Subject: Re: emulating C preprocessor's #if Peter Kwangjun Suk wrote: > On Fri, 24 Jan 2003 03:36:04 +0900 > Joel VanderWerf wrote: > > >>Usually, when writing ruby code, I don't worry about conditional >>compilation, and just use a run-time test. > > > What about using the Factory pattern, and instantiating an object of a platform-specific subclass? Thanks, but I was avoiding any extra objects or method calls because the code is fairly performance critical. (But then maybe I should just be using C anyway, rather than try to write C in Ruby.)