Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sentry-ruby/lib/sentry/breadcrumb_buffer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def to_h
# @return [BreadcrumbBuffer]
def dup
copy = super
copy.buffer = buffer.deep_dup
copy.buffer = buffer.dup
copy
end
end
Expand Down
12 changes: 7 additions & 5 deletions sentry-ruby/lib/sentry/scope.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,15 @@ def clear_breadcrumbs
def dup
copy = super
copy.breadcrumbs = breadcrumbs.dup
copy.contexts = contexts.deep_dup
copy.extra = extra.deep_dup
copy.tags = tags.deep_dup
copy.user = user.deep_dup
# Shallow dup is sufficient for these containers — inner values are not
# mutated after scope duplication, only replaced via merge! or assignment
copy.contexts = contexts.dup
copy.extra = extra.dup
copy.tags = tags.dup
copy.user = user.dup
copy.transaction_name = transaction_name.dup
copy.transaction_source = transaction_source.dup
copy.fingerprint = fingerprint.deep_dup
copy.fingerprint = fingerprint.dup
copy.span = span.deep_dup
copy.session = session.deep_dup
copy.propagation_context = propagation_context.deep_dup
Expand Down
Loading