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:
parent
2455ad4ff1
commit
64f1b7e459
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user