------ art_8627_12592421.1144426901603 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I think you problems is in the report class. Each time you do report = Report.new, you won't be getting any data carried over from the last report object. Is report.ID_list a method on the class? or on the instance? The only way I can see it keeping data around is if you have some type of data structure as a class variable, when you meant it to be an instance variable. mark On 4/7/06, Nathan Olberding <nathan.olberding / gmail.com> wrote: > > > Some code would help. Saying: ... > > require 'my_stuff' # Includes the Report class > > file_list = Dir.new("reports") > yes_list = [] > no_list = [] > file_list.each do |file| > if file_name =~ /yes/ > report = Report.new(file_name) > yes_list.push(report.ID_list) > elsif file_name =~ /no/ > report = Report.new(file_name) > no_list.push(report.ID_list) > end > end > > puts yes_list.inspect > puts no_list.inspect > > > > Both yes and no lists gather way more data than they're supposed to and > based on the excess data I'm seeing, it looks like it just isn't > deleting old data from the old instance of report. > > I've (feebly) tried report.delete, report.replace, and report = nil at > the end of each if block, if that helps convey my goal. > > -- > Posted via http://www.ruby-forum.com/. > > -- Mark Van Holstyn mvette13 / gmail.com http://lotswholetime.com ------ art_8627_12592421.1144426901603--