From: Rick DeNatale Date: 2008-03-20T20:16:08+09:00 Subject: Re: combine array(string) to string? On 3/20/08, 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. In fact, there's no way to declare types of variables in Ruby. At any given time a variable is bound to a particular object, but which object (with its 'type', whatever that means) can change by reassignment to the variable. Somehow, it seems that this notion of 'declaring' a variable type by assigning a 'prototype' object before setting the variable to the 'real' value seems to have become a common misconception in several threads here on ruby-talk. Not sure why. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/