From: Phillip Gawlowski Date: 2011-10-11T20:14:53+09:00 Subject: Re: why does `a + f b` not parse? On Tue, Oct 11, 2011 at 1:02 PM, Dave Aronson wrote: > > That's the odd part.  Just saying "sqrt 5" works (assuming you've > included Math, else "Math.sqrt 5").  But tack "2 +" on the front, and > suddenly Ruby can't parse it any more, even though it has now *more* > of a clue that what's coming is a mathematical expression. Actually: No. As far as Ruby is concerned, you are chaining method calls (remember: + is a method, not an operator!). That this is a mathematical expression is coincidental A (somewhat) contrived example: "x 2" Is that a method call (x(2)), or do you want to multiply 2 and x? -- Phillip Gawlowski gplus.to/phgaw | twitter.com/phgaw A method of solution is perfect if we can forsee from the start, and even prove, that following that method we shall attain our aim.               -- Leibniz