Skip to content

Commit 8d63d0e

Browse files
authored
Merge pull request #1135 from technicalpickles/qualify-struct
Qualify Struct reference to avoid collisions with possible cop namespace
2 parents e1b1fff + a21f4a3 commit 8d63d0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rubocop/cop/mixin/index_method.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def execute_correction(corrector, node, correction)
102102
end
103103

104104
# Internal helper class to hold match data
105-
Captures = Struct.new(
105+
Captures = ::Struct.new(
106106
:transformed_argname,
107107
:transforming_body_expr
108108
) do
@@ -112,7 +112,7 @@ def noop_transformation?
112112
end
113113

114114
# Internal helper class to hold autocorrect data
115-
Autocorrection = Struct.new(:match, :block_node, :leading, :trailing) do
115+
Autocorrection = ::Struct.new(:match, :block_node, :leading, :trailing) do
116116
def self.from_each_with_object(node, match)
117117
new(match, node, 0, 0)
118118
end

0 commit comments

Comments
 (0)