From: Paganoni Date: 2009-03-23T03:57:06+09:00 Subject: Re: How #{} works le 22/03/2009 14:53, Fran�ois Montel nous a dit: > Can anyone explain this? > >>> a = ["b"] > => ["b"] >>> a == "b" > => false >>> "#{a}" == "b" > => true > > Since a is an array, how come the last statement evaluates as true? Because, since it's embedded in a string Ruby does a .to_s against the array. And ["b"].to_s == "b" is true