Skip to content

Commit

Permalink
Merge pull request #1135 from technicalpickles/qualify-struct
Browse files Browse the repository at this point in the history
Qualify Struct reference to avoid collisions with possible cop namespace
  • Loading branch information
koic committed Sep 29, 2023
2 parents e1b1fff + a21f4a3 commit 8d63d0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rubocop/cop/mixin/index_method.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def execute_correction(corrector, node, correction)
end

# Internal helper class to hold match data
Captures = Struct.new(
Captures = ::Struct.new(
:transformed_argname,
:transforming_body_expr
) do
Expand All @@ -112,7 +112,7 @@ def noop_transformation?
end

# Internal helper class to hold autocorrect data
Autocorrection = Struct.new(:match, :block_node, :leading, :trailing) do
Autocorrection = ::Struct.new(:match, :block_node, :leading, :trailing) do
def self.from_each_with_object(node, match)
new(match, node, 0, 0)
end
Expand Down

0 comments on commit 8d63d0e

Please sign in to comment.