Skip to content

Commit 37508ca

Browse files
committed
Merge branch 'perf/scope-and-breadcrumb-shallow-dup' into perf/reduce-memory-allocations
# Conflicts: # sentry-ruby/lib/sentry/scope.rb
2 parents 48063a2 + 10e025e commit 37508ca

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sentry-ruby/lib/sentry/scope.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ def clear_breadcrumbs
124124
def dup
125125
copy = super
126126
copy.breadcrumbs = breadcrumbs.dup
127-
# contexts contains os/runtime (class-level frozen hashes) — shallow dup of outer hash is sufficient
128-
# since inner hashes are not mutated after being set
127+
# Shallow dup is sufficient for these containers — inner values are not
128+
# mutated after scope duplication, only replaced via merge! or assignment
129129
copy.contexts = contexts.dup
130130
copy.extra = extra.dup
131131
copy.tags = tags.dup

0 commit comments

Comments
 (0)