>> You are doing lots of unnecessary work there.  Since MatchData#captures
>> returns an array and Array already defines each, you don't need to
>> create
>> any enumerator at all to iterate through the #captures array:
>>
>
> As the op said:
>
>>>> This is what I've done just to
>>>> experiment:

Exactly - that was just to get proof of Enumerator working. In my 
method, I just use :each of an Array object:

def x
  File.open('screen.css') do |f|
    while line = f.gets
      file = line.match(/" (\w* [.] css) "/xms).captures
      file.each do |entry|
        puts entry
        y(entry)
      end
    end
  end
end

-- 
Posted via http://www.ruby-forum.com/.