From: apeiros Date: 2008-04-14T04:56:30+09:00 Subject: Re: Check if library available? Am 13.04.2008 um 20:17 schrieb Trans: > Hi-- > > Is there any way to detect if a library is available without actually > loading it, besides manually searching through $LOAD_PATH one's self? > > If not, I'd like to suggest that a method for this be added. It's > useful in cases where an app depends on an external library, but may > have alternatives to fall back on, or simply deactivate certain > functions. If an app depends on an external library, it can just try to require it, and use the fallback in a rescue LoadError clause. You can add a require_or_fallback or similarly named method to Kernel to do that for you if don't like to repeat the code. Personally I don't see the problem. Regards Stefan