On Jan 15, 2011, at 04:07 , Joseph Lenton wrote: >> The solution is to use a real ruby editor (emacs, vim, textmate, I'm >> sure many others) that supports proper indentation. The problem pops out >> visually and is easily solved before it is even a problem. >> > > I already do use a proper editor and indent my code correctly, but there > are times when they can still slip through. I almost never have this happen in emacs (past a couple lines of coding). It is pretty much automatically pointed out as soon as I hit return and then later hit tab to indent. (I used to bind return to newline-and-indent, but that gets really slow with larger files--esp w/ ruby). Either you wind up with code like: > def x > if x then > blah > > rest_of_method > > end or you wind up with: > def x > if x then > blah > end > > rest_of_method > end > end