プロジェクト

全般

プロフィール

バグ #664 » change_account.rb.diff

Takuma Nakajima, 2014-05-07 03:11

差分を表示:

core/plugin/change_account/change_account.rb
20 20
    index = Service.instances.index(Service.primary)
21 21
    if index
22 22
      max = Service.instances.size
23
      bound = max - 1
24
      Service.set_primary(Service.instances[(bound - (bound - index - 1)) % max])
23
      Service.set_primary(Service.instances[(max + index - 1) % max])
25 24
    elsif not Service.instances.empty?
26 25
      Service.set_primary(Service.instances.first) end
27 26
  end
    (1-1/1)