From: Alex Young Date: 2006-07-20T19:59:31+09:00 Subject: Re: return statement where it is usefull ? Yvon Thoraval wrote: > > Le 20 juil. 06 � 11:52, Joey a �crit : > >> >> See, "here" never gets printed, if you didn't have the return keyword: >> def m >> [nil] >> p "here" >> end >> m >> "here" does get printed. > > and what's the returned value in that case ? nil, i guess... It's the return value of the p method, which happens to be nil in this case. In general, it's the value of the last expression in the method. -- Alex