Ensure payload is distinct from what's passed in
This is because we modify what comes in (with, at the very least, :result).
This commit is contained in:
Родитель
3ca44f7db4
Коммит
b3ecf39e45
|
@ -13,6 +13,7 @@ module GitHub
|
|||
#
|
||||
# Returns the return value of the block.
|
||||
def instrument(event, payload = {})
|
||||
payload = (payload || {}).dup
|
||||
if instrumentation_service
|
||||
instrumentation_service.instrument(event, payload) do |payload|
|
||||
payload[:result] = yield(payload) if block_given?
|
||||
|
|
Загрузка…
Ссылка в новой задаче