From: Robert Klemme Date: 2005-11-15T23:22:16+09:00 Subject: Re: unexpected behaviour in Pathname? Tanaka Akira wrote: > In article <91B61F46-ABB8-48E7-BB2D-97A3DBE87C3C@sms.ed.ac.uk>, > Matthew Smillie writes: > >> I realise that I can solve this by doing (p + q).read inside the >> block, but surely this isn't the desired behaviour of Pathname#each? > > It is intended for consistency to Dir.entries. > > Use Pathname#children instead. > > Note that Pathname#children doesn't generates "." and "..". > I hope you don't need them. Another - possibly simpler - approach would be to use Dir['/home/matt/test/*']. Kind regards robert