From: Phrogz Date: 2006-12-30T00:55:05+09:00 Subject: Re: Need help with a timing? problem lrlebron@gmail.com wrote: > I am running Ruby 1.8.5 and windows XP. I am working on a program that > monitors a directory and updates and updates a database based on the > changes. At the moment I have some code to handle files that are added. > Basically I have 3 methods: > > Pseudo code > > def monitor > event_handler(array) > end > > event_handler(array) > p array > If file is added > file_added(arr) > end > end > > file_added(array) > #Insert into database > end > > Here's my problem. Let's say I drag 10 files into the directory. If I > only have the event_handler print the array I get all 10. However, when > the event_handler calls the file_added method I only get 5 or 6 files > inserted in the database. The code is not throwing exceptions. You'd better post code to your file_added method, and ensure that the same array is getting passed in, and still has 10 items in it.