Skip to content

Commit

Permalink
perf: Remove redundant allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
arielvalentin authored Dec 23, 2023
1 parent 2785b53 commit c2f07ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions instrumentation/graphql/test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -25,8 +25,9 @@ module SchemaTestPatches
# Reseting @graphql_definition is needed for tests running against version `1.9.x`
# Other variables are used by ~> 2.0.19
def _reset_tracer_for_testing
%w[own_tracers trace_modes trace_class tracers graphql_definition own_trace_modes].each do |ivar|
remove_instance_variable("@#{ivar}") if instance_variable_defined?("@#{ivar}")
%w[own_tracers trace_modes trace_class tracers graphql_definition own_trace_modes].each do |name|
ivar_name = "@#{name}"
remove_instance_variable(ivar_name) if instance_variable_defined?(ivar_name)
end
end
end

0 comments on commit c2f07ab

Please sign in to comment.