From: Alex Young Date: 2008-03-20T17:47:30+09:00 Subject: Re: Error using FasterCSV On Mon, 2008-03-17 at 00:50 +0900, James Gray wrote: > On Mar 16, 2008, at 6:39 AM, Arlen Cuss wrote: > > > Hey, > > > > On Sun, Mar 16, 2008 at 1:35 AM, James Gray > > > > wrote: > > > >> My guess is this: you named your own file fastercsv.rb. When you > >> try > >> to require the gem, Ruby is finding your file first and it fails to > >> load because FasterCSV was never defined. If I'm right, you just > >> need > >> to rename your file and it will work. > >> > > > > That was an awesome piece of deduction, and a joy to see. > > I got lucky. ;) I've seen this problem come up before, a couple of times - hell, I've even made the same mistake myself more than once :-) Is there a decent use case for require() loading the same file it was called from, or is it allowed because preventing it (or treating the file itself as effectively at the tail end of $:) would require too much overhead? -- Alex