From: Gavin Sinclair Date: 2012-01-31T15:46:07+09:00 Subject: Multiple assignment in conditional --485b397dd68d32ba8504b7cd51ea Content-Type: text/plain; charset=ISO-8859-1 I find this a strange Ruby error. foo = [1,2] # The following is fine. if (a = foo) puts a end # The following causes a SyntaxError: multiple assignment in conditional. if (a, b = foo) puts a end Why would that be a syntax error? Surely the grammar is if EXPR ... and (a, b = foo) is an expression, isn't it? Just curious, though my curiosity was prompted by a failing piece of real code. Gavin --485b397dd68d32ba8504b7cd51ea--