```Issue #4443 has been updated by ko1 (Koichi Sasada).

Assignee changed from matz (Yukihiro Matsumoto) to ko1 (Koichi Sasada)

----------------------------------------
Bug #4443: odd evaluation order in a multiple assignment
https://bugs.ruby-lang.org/issues/4443#change-28032

Author: mame (Yusuke Endoh)
Status: Assigned
Priority: Normal
Category:
Target version:
ruby -v: -

=begin
?????¤ã?§ã?????core ??«æ???????¦ã????¾ã?£ã??????????ªã?®ã?§ç?»é?²ã????´ã?????

Ruby ??¯å·¦????????«è??ä¾¡ã????²ã????¨ä¿¡?????¦ã???????®ã?§ã????????å¤????ä»£å?¥ã?§è????????????¾ã????????

def foo
p :foo
[]
end
def bar
p :bar
end

x, foo[0] = bar, 0

bar ?????? foo ???å·¦ã?«ã???????®ã?§ã??:foo ???:bar ??®é????«å?ºå????????????????¨ã?????å¾?????????®ã?§ã??????????ªã????? :bar ???:foo ??«ã?ªã????¾ã?????

??·ä???????«ä???????°ã???????¨ã???????¨ã??ä¾???????

obj, obj.foo = obj.foo, obj

??«ã?? swap ??????å¾??????????????§ã????????????????ªã????¾ã??????????????????????³ã?¼ã????¯å???????«ã????¨ã?®å??è»¢ã?ªã?©ã??å®?è£?????????¨ã????«ã????°ã????°æ?¸ã?????????ªã????¾ã??????????®æ???????«æ???????¤ã???????®ã?? splay tree ???å®?è£??????¦ã???????¨ã????§ã????????????????ªã??:

t.left, t.left.right, t = t.left.right, t, t.left

1.9 ç³»å????§ä¿®æ­£ã????¹ã????¨ã?¾ã?§ã?¯æ???????¾ã???????????2.0 ??§ç?´ã????½æ?§ã?¯ã???????§ã??????????????

foo[0] = bar

??¯ã?¡ã???????? :foo ???:bar ??®é????«å?ºã?¾ã?????

--
Yusuke Endoh <mame / tsg.ne.jp>
=end

--
http://bugs.ruby-lang.org/

```