On 20.01.2007 20:07, Paul wrote: > Robert Klemme wrote: >> I think it's trying to parse as >> puts('foo' + x.to_s, +'bar') >> >> where the comma is missing. So it thinks +'bar' is not an argument to >> to_s but to puts. >> > > I originally came across this when I was trying to assign something > similar to a variable (trying to create a filename). > > That is: filename = 'foo' + x.to_s +'bar' > > Would it still be trying to use the +'bar' as an argument when trying > to do an assignment? Dunno. Maybe. This is valid Ruby: irb(main):001:0> a = 1,2,3 => [1, 2, 3] So you *can* have multiple values on the right (as well as on the left). Kind regards robert