An alternative to << is the concat method (which does not allow you to chain) : concat « String « Ruby






An alternative to << is the concat method (which does not allow you to chain)


puts "Hello, ".concat "myValue!"

 

Related examples in the same category

1.Call concat method through string variable