From: RichardOnRails Date: 2011-05-25T12:35:41+09:00 Subject: Re: Scope problem (?) in implementing Design Patterns in Ruby On May 12, 9:56 pm, David Jacobs wrote: > Second, look into higher order functions. They let you change code from this: Hi Dave, I just want to let you know your tutelage on this thread has not gone in vain. 1. I wanted to return a list (i.e. array) of filenames rather than concatenated strings. Maybe parsing the concatenated strings would have gotten me my lists, but I want the arrays to be the direct output (in part just to see if I understood your code well enough to do it.) 2. I wanted to do it by passing a search pattern to Filename.new and a directory to the related expression. These changes are displayed at http://www.pastie.org/1969301 I'm continuing to work on embracing the higher-order methods you advocated. Best wishes, Richard