From: William James Date: 2006-07-09T04:05:05+09:00 Subject: Re: Sweet Lord! Daniel Schierbeck wrote: > Why haven't I thought of this before? > > class Terminal > include Enumerable > > def each(&block) > while input = gets > block.call(input.chomp) > end > end def each while input = gets yield input.chomp end end