From: Gavin Sinclair Date: 2003-09-24T00:33:30+09:00 Subject: Re: Dir.foreach not with patterns? On Wednesday, September 24, 2003, 12:33:54 AM, Alan wrote: > ts wrote: >> next if f == "." or f == ".." > I did used to do that. I can't even remember why I changed it to a regexp! Come on, you can't resist. class Object def in?(enum) enum.include?(self) end end ... next if f.in? [".", ".."] ... Isn't that much nicer? ;) Gavin