From: Brian Candler Date: 2004-11-06T22:38:16+09:00 Subject: Re: argument parenths > |Any chance the parenths/space requirement will go away in 2.0? > | > | method (1, 2, 3) > > Not sure. Only if I can make yacc rules smart enough to parse/detect > > method (arg1), arg2 Are you talking about the warning you get if you do method (1, 2, 3) instead of method(1, 2, 3) ? I wonder if this is related to the bracket ambiguity, i.e. puts (a+b).abs => puts((a+b).abs) puts(a+b).abs => (puts(a+b)).abs Neither of these generates a warning (1.8.2p2), but they do different things depending on whether the space is there or not. Trying a few combinations with more than one argument: 1. puts (a+b), c works - no warning is generated 2. puts(a+b), c fails 3. puts(a+b, c) works - no warning 4. puts (a+b, c) works - but generates a warning 5. puts (a+b) works - no warning 6. puts(a+b) works - no warning So I'm not exactly sure why case 4 generates a warning, but case 5 doesn't. In case 4, the brackets contain a comma, so surely it must be an argument list, and therefore must be associated with the method name before it? The example "method (arg1), arg2" seems to be an example of case 1, and that works just fine under 1.8.2-p2 There is an ambiguity for foo(bar (a+b), c) which generates warning: parenthesize argument(s) for future version but it seems to resolve it as foo(bar((a+b),c)) which I suppose is as reasonable a guess as any. Regards, Brian.