Dave Thomas wrote: > Robert Feldt <feldt / ce.chalmers.se> writes: > > > Anyone knows of a Ruby coding standard or at least some recommendations on > > how to write Ruby code that is easily readable? Has some consensus > > evolved? > > Have a look at some of the library code. If you feel it's readable, > then copy its style ;-) > > I personally use the One True Editor, and Ruby comes with an emacs > mode that lays things out the way _I_ like out of the box (except: > Matz- that last 'do' change means iterators no longer lay out > properly) > > One style thing I have evolved towards is attempting to be consistent > in my choice of do/end or {,} for iterators. I've come down in favor > of using {} for single line iterators and do/end for multiline ones: Yes. I agree. > > > a.each { |l| puts l} Use L (block letter) as variable, otherwise it looks like 1(one) Jilani