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:
Matt Todd 2014-08-30 23:22:29 -07:00
Родитель 3ca44f7db4
Коммит b3ecf39e45
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -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?