Skip to content

Commit 7c6f709

Browse files
committed
Ensure payload is distinct from what's passed in
This is because we modify what comes in (with, at the very least, :result).
1 parent 910b13e commit 7c6f709

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/net/ldap/instrumentation.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module Net::LDAP::Instrumentation
1010
#
1111
# Returns the return value of the block.
1212
def instrument(event, payload = {})
13+
payload = (payload || {}).dup
1314
if instrumentation_service
1415
instrumentation_service.instrument(event, payload) do |payload|
1516
payload[:result] = yield(payload) if block_given?

0 commit comments

Comments
 (0)