From: Simon Mullis Date: 2007-10-12T19:54:13+09:00 Subject: Array += Hi All, Question re Array method += and >> a = [] => [] >> a += [1, 2, 3, 4] => [1, 2, 3, 4] And >> (a ||= []) << [1, 2, 3, 4] => [[1, 2, 3, 4]] But >> ( a ||= [] ) += [ 1, 2, 3, 4 ] SyntaxError: compile error (irb):28: syntax error, unexpected tOP_ASGN, expecting $end ( a ||= [] ) += [ 1, 2, 3, 4 ] ^ from (irb):28 Why? I guess it's a precedence issue. '<<' is a method in the Array class. '+=' is not. Is there alternate syntax I should use? Thanks SM