On Jun 21, 2006, at 9:25 AM, gwtmp01 / mac.com wrote:

> Since you asked... The following is much more readable to me than your
> example.

Minor updates to satisfy my own readability scale:

> def print_dir(path)
>   Dir.foreach(path) do |file_name|

if File.directory? file_name
   puts "[dir] #{file_name}"

>       else

puts "      #{file_name}"

>       end
>   end
> end
> print_dir '.'

James Edward Gray II