When you write this:
u = v
v = u % v
I think this is something like this:
u = v
v = v % v
And I will try to answer the question about setting a variable. This is my test code:
a = 1
b = 2
a, b = 3, a
You can see that itβs just like a, b = [3, a]that, you will first appreciate the game [3, a]. And here comes the Ripperanalysis:
[:program,
[[:massign,
[[:@ident, "a", [1, 0]], [:@ident, "b", [1, 2]]],
[:mrhs_new_from_args,
[[:@int, "3", [1, 4]]],
[:var_ref, [:@ident, "a", [1, 6]]]]]]]
You will see what :mrhs_new_from_argswill be evaluated first, as I said above.