From: Patrick Gundlach Date: 2006-07-20T17:58:09+09:00 Subject: Re: return statement where it is usefull ? Hi, > 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) I think that both cases are usefull: return indicates that you intention to return something and you don't do it by accident. It's more for the human who reads the code. (my 0.02 ���) Patrick -- Posted via http://www.ruby-forum.com/.