From: Han Holl Date: 2005-09-16T23:24:16+09:00 Subject: Re: bug in require? ------=_Part_8576_8914796.1126880653560 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 9/16/05, Yukihiro Matsumoto wrote: >=20 > Hi, >=20 > In message "Re: bug in require?" > on Fri, 16 Sep 2005 20:56:38 +0900, Han Holl writes: >=20 > |Yes, that's answering where it happens. > |Remains the question why. >=20 > It was the easiest way to check if a file is loadable (i.e. a file > exists and has proper permissions). Maybe it's possible to replace it > with access(3). >=20 > matz. >=20 > Ara's question was what the difference was between execution from the=20 commandline and from a script. Only now I see that the difference is that from the commandline he requires= =20 "digest/md5.so", and from the file 'digest/md5', without the extension. Which means that you get a considerable perfomance penalty by omitting the= =20 extension. In a gem-installed rails environment the seachpath can easily be= =20 25 directories. Multiple requires withou extension can be costly there. Cheers, Han ------=_Part_8576_8914796.1126880653560--