From: Albert Schlef Date: 2008-12-28T19:28:33+09:00 Subject: Syntax error I don't understand (I'm using Ruby 1.8.6.) I'm trying to add a random number to an array. I do: a = [] a << rand 3 But ruby replies with "syntax error, unexpected tINTEGER, expecting kDO or '{' or '('" Why's that? When I add parentheses to the function call, as in... a = [] a << rand(3) ...then I don't get this syntax error. I'd like to understand why this happens. -- Posted via http://www.ruby-forum.com/.