1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

Stopped using Array#index as it is not compatible with ruby 1.8.5

This commit is contained in:
Javi Fontan 2010-09-15 16:48:21 +02:00
parent 2455ad4ff1
commit 64f1b7e459

View File

@ -168,11 +168,16 @@ private
end
def get_first_runable
action_index=@action_queue.index do |action|
if action[:args][HOST_ARG]
!@hosts.include? action[:args][HOST_ARG]
action_index=nil
@action_queue.each_with_index do |action, index|
if action[:args][HOST_ARG]
if !@hosts.include?(action[:args][HOST_ARG])
action_index=index
break
end
else
true
action_index=index
break
end
end