# Re: Using parenthesis/barackets in ruby

**URL:** <https://www.ruby-forum.com/t/re-using-parenthesis-barackets-in-ruby/95980>\
**Category:** Ruby\
**Created:** [June 21, 2006, 5:09pm UTC](https://www.ruby-forum.com/t/re-using-parenthesis-barackets-in-ruby/95980 "2006-06-21T17:09:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 21, 2006, 5:09pm UTC](https://www.ruby-forum.com/t/re-using-parenthesis-barackets-in-ruby/95980/1 "2006-06-21T17:09:07Z")

</div>

> > 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
