From: Alex Stahl Date: 2010-08-05T05:12:04+09:00 Subject: Re: A little problem In the first function, you're performing interpolation on the variable; i.e. the #{} construct, when included inside "", indicates to the interpreter to evaluate it as code, not text. In the second function, you're performing concatenation of the string "Hello" with the value of the variable name. In this case, the interpolation is automatic since the variable is outside the "". Hope this helps. On Wed, 2010-08-04 at 14:57 -0500, Amir Ebrahimifard wrote: > Hi > What is difference between these 2 codes ? > (when I executed these codes result was the same ) > > --------------------- > def welcome1( name ) > puts "Hello#{name}" > end > > def welcome2( name ) > puts "Hello"+name > end > > welcome1( Amir ) > welcome2( Amir ) > > ---------------------