Tanaka Akira wrote:
> In article <91B61F46-ABB8-48E7-BB2D-97A3DBE87C3C / sms.ed.ac.uk>,
>   Matthew Smillie <M.B.Smillie / sms.ed.ac.uk> 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