From: Martin Hansen Date: 2010-04-19T21:23:29+09:00 Subject: Re: Writing a parser @Robert, I was wondering about the whole approach, keeping in mind what Ryan suggested (drop class Record which apparently is silly, and loose dangling IO stuff). It strikes me that the simplest way to solve this is to create an external iterator as a mixin (O'Reilly, Ruby Programming Language, p 138). This is pretty much what you already suggested, without the foreach method, which I don't need. module Record include Enumerable def each loop { yield self.next } end end -- Posted via http://www.ruby-forum.com/.