Z T wrote: > When I run my program: > > arg1="Ruby", arg2="Rails", arg3="Rails" > puts "#{arg1}, #{arg2}, #{arg3}" > > Why is the output as follow: > RubyRailsRails, Rails, Rails > > What is the reason for this output? Thanks in advance. > > The reason is that assignment returns something. So arg3="Rails" actually returns the string "Rails" and as the other posters have pointed out the comma is a way of listing array items. So starting from the right arg1="Ruby", arg2="Rails", arg3="Rails" We do the first assignment (arg3="Rails") which gives us arg1="Ruby", arg2="Rails", "Rails" We do the second assignment (arg2="Rails") which gives us arg1="Ruby", "Rails", "Rails" And finally we do the last assignment (arg1="Ruby", "Rails", "Rails") Clear as mud :)