On 1/20/07, Paul <tester.paul / gmail.com> 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?

it may be parsing as 'foo' + x.to_s(+'bar') since to_s can sometimes
take an argument.