From: Dave Baldwin Date: 2006-07-20T20:23:11+09:00 Subject: Re: return statement where it is usefull ? On 20 Jul 2006, at 09:40, Une b�vue wrote: > i've the habit (from java ;-)) to put a return statement in a method > like that : > > def get_server_index(server) > if self.servers.include?(server) > return self.servers.index(server) > end > return -1 > end > > in that case, is it usefull ? (i think not) > > where could be it usefull ? > never ??? > As a documentation aid. From the middle of a condition without falling through to the bottom of the method To return more than one value Dave. > -- > une b�vue >