diff --git a/lib/rubocop/rspec/expect_offense.rb b/lib/rubocop/rspec/expect_offense.rb index 7140ef2487e..b44eb1b664e 100644 --- a/lib/rubocop/rspec/expect_offense.rb +++ b/lib/rubocop/rspec/expect_offense.rb @@ -209,6 +209,7 @@ def self.parse(annotated_source) source << source_line end end + annotations.each { |a| a[0] = 1 } if source.empty? new(source, annotations) end