Skip to content

Commit a122559

Browse files
committed
Use explicit block argument instead of yield
1 parent 348f9cb commit a122559

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

workers/event_catcher/event_catcher.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def create_property_filter(vim, event_history_collector)
8989
)
9090
end
9191

92-
def wait_for_updates(vim)
92+
def wait_for_updates(vim, &block)
9393
version = nil
9494
options = RbVmomi::VIM.WaitOptions(:maxWaitSeconds => 60)
9595

@@ -104,9 +104,7 @@ def wait_for_updates(vim)
104104
Array(property_filter_update.objectSet).each do |object_update|
105105
next unless object_update.kind == "modify"
106106

107-
Array(object_update.changeSet).each do |property_change|
108-
yield property_change
109-
end
107+
Array(object_update.changeSet).each(&block)
110108
end
111109
end
112110
end

0 commit comments

Comments
 (0)