Using parenthesis/barackets in ruby

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

Minor updates to satisfy my own readability scale:
(snip)

FORE!!!

def print_dir(path)
  Dir.foreach(path) do |f|
    puts "#{File.directory?(f) ? '[dir]' : ' '*5} #{f}"
  end
end

In response to one of the comments in the OP, I think addiction to parens is
unhealthy and should be cured.

This, coming from a ?: junkie.

sd