Skip to content

Commit b9636b2

Browse files
committed
Fix internal affair of edge-rubocop
https://app.circleci.com/pipelines/github/rubocop/rubocop-rspec/997/workflows/2bdf0dff-c7d0-47fe-9180-545ae81ffb0a/jobs/21952 ``` Offenses: lib/rubocop/rspec/align_let_brace.rb:37:30: C: [Correctable] InternalAffairs/LocationLineEqualityComparison: Use same_line?(member, let). member == let && member.loc.line == let.loc.line ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 224 files inspected, 1 offense detected, 1 offense auto-correctable ```
1 parent 8ca86f6 commit b9636b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/rubocop/rspec/align_let_brace.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module RSpec
55
# Shared behavior for aligning braces for single line lets
66
class AlignLetBrace
77
include RuboCop::RSpec::Language
8+
include RuboCop::Cop::Util
89

910
def initialize(root, token)
1011
@root = root
@@ -34,7 +35,7 @@ def target_column_for(let)
3435
def let_group_for(let)
3536
adjacent_let_chunks.detect do |chunk|
3637
chunk.any? do |member|
37-
member == let && member.loc.line == let.loc.line
38+
member == let && same_line?(member, let)
3839
end
3940
end
4041
end

0 commit comments

Comments
 (0)