Jason Nordwick wrote: > YAD wrote: >> Jason Nordwick wrote: >>> (grid+grid.transpose) >> Is this correct Ruby? If so, is it documented online somewhere? >> You're not really adding the arrays, are you? > > Plus for arrays and strings is concatenation. I don't like it either, > b/c array plus should be addition of corresponding elements, but that is > the way things are. > > -j No, Vectors should add elemets as they represent mesurable value. Arrays are part of Set Thoery and as such + most obviously represents the union of two sets. This is niether correct nor intuitive: ["red","orange",yellow] + ["green","blue","purple"] => ["reggreen","orangeblue","yellowpurple] #incorrect! -- Posted via http://www.ruby-forum.com/.