--_1f18c538-383b-4360-b5b9-d75eb962e598_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


An issue pops up when I use a method's integer return value in a function argument while performing arithmetic on that value. Then missing whitespace between the arithmetical operator and the second argument can cause random errors, but only if there is whitespace preceding the operator. I don't want to rush to judgement and call this a bug, but it certainly seems likene, hidden till now because you have have formatting that's slightly ugly for the error to turn up. Here's an irb session that demonstrates the issue:
irb(main):062:0* x = '123456'=> "123456"irb(main):063:0> x.slice(1, x.size -2)SyntaxError: compile error(irb):63: syntax error, unexpected ')', expecting kDO_BLOCK        from (irb):63        from :0irb(main):064:0>.slice(1, x.size - 2)=> "2345"irb(main):065:0> x.slice(1, x.size-2)=> "2345"irb(main):066:0> x.slice(1, x.size -2)SyntaxError: compile error(irb):66: syntax error, unexpected ')', expecting kDO_BLOCK        from (irb):66        from :0irb(main):067:0> x[x.size -3,1]ArgumentError: wrong number of arguments (2 for 0)        from (irb):67:in `size'        from (irb):67        from :0irb(main):068:0> x[x.size - 3,1]=> "4"irb(main):069:0> def ok(a,b)irb(main):070:1> end=> nilirb(main):071:0> ok(x.size +3,4)ArgumentError: wrong number of arguments (2 for 0)        from (irb):71:in `size'        from (irb):71        from :0irb(main):072:0> ok(4,x.size +3)SyntaxError: compile error(irb):72: syntax error, unexpected)', expecting kDO_BLOCK        from (irb):72        from :0irb(main):074:0> ok(4,x.size + 3)=> nil
 		 	   		  -_1f18c538-383b-4360-b5b9-d75eb962e598_--