From: "wardrop (Tom Wardrop)" Date: 2013-03-31T10:31:41+09:00 Subject: [ruby-core:53848] [ruby-trunk - Feature #8190] Truly parallel assignment Issue #8190 has been updated by wardrop (Tom Wardrop). =begin Hmm, yeah that request seems reasonable. Right now it seems to be assigning left-to-right. So (({i})) is assigned (({s[i]})), making (({i})) equal to (({1})), only then is (({s[i]})) evaluated and assigned (({7})) as if it's a separate expression on a new line. Could be a difficult change to make at least in terms of backwards compatibility, but the suggest behaviour is less surprising than the current behavior in my opinion. =end ---------------------------------------- Feature #8190: Truly parallel assignment https://bugs.ruby-lang.org/issues/8190#change-38060 Author: Lavir_the_Whiolet (Lavir the Whiolet) Status: Open Priority: Normal Assignee: Category: Target version: =begin i = 0 s = [1,2,3] i, s[i] =s[i], 7 p s #=> [1, 7, 3] s is expected to be [7, 2, 3]. =end -- http://bugs.ruby-lang.org/