From: James Edward Gray II Date: 2007-06-06T22:50:28+09:00 Subject: Re: not sure what is wrong here. On Jun 6, 2007, at 8:30 AM, Junkone wrote: > i am not sure what is wrong here > tablearr is of type FASTERCSV::TABLE > eachrow is of type FASTERCSV::ROW > as per the fastercsv doc, the table.values_at returns a array. > the array has method .include? > > def checkduplicates(eachrow,tablearr,indx,criteria) > eachrow.each{|name,valu| > rowdata=tablearr.values_at(indx+criteria) > if(rowdata.include?valu)<<<<<<<<<<<<< ERROR HERE. > puts "match" > end > > } > > c:/ruby/lib/ruby/gems/1.8/gems/fastercsv-1.2.0/lib/faster_csv.rb: > 345:in `==': undefined method `row' for "03":String (NoMethodError) > from scan.rb:7:in `include?' I'm happy to help debug this, but it would be much easier if I had some code I could run. Could you try reducing the error to a simple little script, using included dummy data, that shows the problem? When I see that, I'm sure I can provide some suggestions. James Edward Gray II