From: Robert Klemme Date: 2008-03-21T17:39:55+09:00 Subject: Re: combine array(string) to string? On 20.03.2008 21:48, Todd Benson wrote: > On Thu, Mar 20, 2008 at 12:29 PM, Robert Klemme > wrote: >> On 20.03.2008 11:49, Todd Benson wrote: >> > On Thu, Mar 20, 2008 at 4:44 AM, Pat Kiatchaipipat wrote: >> >> str= "ABCDE" >> >> arr = Array.new >> > >> > You really don't need to declare your type. The arr = Array.new >> > statement is unnecessary. >> >> Sorry to be nitpicky, this is in no way a type declaration. It is just >> a superfluous object creation and assignment. > > Okay, "the instantiation of the Array object is unnecessary". From > some newbies, I've seen them pull this type of code practice from > fortran, pascal, c, etc... so I used the phrase "declare your type". I can see where that comes from and I did not want to disregard the point you were trying to make. I just thought it a bit unfortunate that your wording kind of encourages the practice by insinuating that there is indeed something like a variable type declaration in Ruby. :-) Cheers robert