From: Louis J Scoras Date: 2006-10-06T22:50:08+09:00 Subject: Re: What is the reason for this syntax? On 10/6/06, Jean Helou wrote: > As far as I know nothing prevents you from using a semi-colon at the > end of your statements if you wish ... Sure you can, but that solves a different problem really. If you want to continue with more than one expression per line, reach for the semicolon. You see this idiom a lot when building up a hash with inject. some_enumerable.inject(Hash.new(0)) {|h, i| h[i]+= 1 ; h} Since the semicolon is not required though--i.e.: an endline is a valid separator--you must leave the line in a place such that the parsing will be unambiguous. Lines need to be broken after operators rather than before. The reason you would want it the other way around is so that you can see what's going on in the code by scanning the beginning of the lines. -- Lou.