From: Robert Klemme Date: 2007-01-20T17:55:23+09:00 Subject: Re: Bug in Ruby with adding strings? On 19.01.2007 23:07, dflanagan@gmail.com wrote: > I suspect that having no space after the + makes Ruby think it is a > unary operator. And since to_s is a method, Ruby thinks that you're > passing +'bar' to x.to_s. This can't be the only problem, though, > since it is giving you a SyntaxError before it actually complains about > passing an unexpected argument to to_s... 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. Regards robert