Skip to content

Commit 508a553

Browse files
committed
Record result in payload, pass payload to block
1 parent d2df85e commit 508a553

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/net/ldap.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,10 +1246,10 @@ def setup_encryption(args)
12461246
#
12471247
# Returns the return value of the block.
12481248
def instrument(event, payload = {})
1249-
return yield unless instrumentation_service
1249+
return yield(payload) unless instrumentation_service
12501250

1251-
instrumentation_service.instrument(event, payload) do
1252-
yield
1251+
instrumentation_service.instrument(event, payload) do |payload|
1252+
payload[:result] = yield(payload)
12531253
end
12541254
end
12551255
private :instrument

0 commit comments

Comments
 (0)