From: Paul Brannan Date: 2002-03-19T23:30:15+09:00 Subject: Re: style choice On Tue, Mar 19, 2002 at 10:53:00PM +0900, David Alan Black wrote: > My instincts, such as they are, might lead me to do: > > def degree > if @degree == 0 > @scopes.each {|field| @degree += field.length} > end > @degree > end Possibly because this leads to less duplication of code; the code that returns @degree is found only once here, and twice in the original two snippets. Paul