code golfで遊んでいたんだけど

$a=" bottles of beer on the wall"
99.downto(1){|i|
  $x=$y||="#{i}#$a"
  puts $x
  puts "#$x, "+$x[0..-13]+".",
  (i==1 ? "Go to the store and buy some more, #$y" : "Take one down and pass it around, #{i-1}#$a")+".\n\n"}
で、
99 bottles of beer on the wall
99 bottles of beer on the wall, 99 bottles of beer.
Take one down and pass it around, 3 bottles of beer on the wall.

99 bottles of beer on the wall
99 bottles of beer on the wall, 99 bottles of beer.
Take one down and pass it around, 2 bottles of beer on the wall.

99 bottles of beer on the wall
99 bottles of beer on the wall, 99 bottles of beer.
Take one down and pass it around, 1 bottles of beer on the wall.

99 bottles of beer on the wall
99 bottles of beer on the wall, 99 bottles of beer.
Go to the store and buy some more, 99 bottles of beer on the wall.

になるんだよね。

代入がy||=x=iとか、x=y||=iとかだと、もしかしてxに代入できないのかと思ってちょっと見てるんだけど
自己代入が文脈を無視して常にy||(y = x = i)と展開されるようだと代入されないなあと思うんだけど、どうなんでしょう。
Ruby1.8.5です。