From: Han Holl Date: 2005-09-16T19:14:21+09:00 Subject: Re: bug in require? ------=_Part_8219_4949088.1126865657887 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline [ahoward@localhost ~]$ cat a.rb > 4.times{ require 'digest/md5' } >=20 > [ahoward@localhost ~]$ strace ruby a.rb 2>&1 |grep open|grep md5 > open("/usr/local/lib/ruby/1.8/i686-linux/digest/md5.so",=20 > O_RDONLY|O_LARGEFILE) =3D 3 > open("/usr/local/lib/ruby/1.8/i686-linux/digest/md5.so",=20 > O_RDONLY|O_LARGEFILE) =3D 3 > open("/usr/local/lib/ruby/1.8/i686-linux/digest/md5.so", O_RDONLY) =3D 3 > open("/usr/local/lib/ruby/1.8/i686-linux/digest/md5.so",=20 > O_RDONLY|O_LARGEFILE) =3D 3 > open("/usr/local/lib/ruby/1.8/i686-linux/digest/md5.so",=20 > O_RDONLY|O_LARGEFILE) =3D 3 > open("/usr/local/lib/ruby/1.8/i686-linux/digest/md5.so",=20 > O_RDONLY|O_LARGEFILE) =3D 3 >=20 > why the difference? If you look at the stracefile, you'll notice that the last three times it= =20 just open and closes the file, without reading. I'm very interested in this= ,=20 because I've noticed the same behaviour with my Rails application, and ther= e=20 the search path is _huge_. Han Holl -a > -- >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > | email :: ara [dot] t [dot] howard [at] noaa [dot] gov > | phone :: 303.497.6469 > | Your life dwells amoung the causes of death > | Like a lamp standing in a strong breeze. --Nagarjuna >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >=20 >=20 > ------=_Part_8219_4949088.1126865657887--