lib/rubocop/cop/mixin/space_before_punctuation.rb in rubocop-0.42.0 vs lib/rubocop/cop/mixin/space_before_punctuation.rb in rubocop-0.43.0
- old
+ new
@@ -18,13 +18,11 @@
tokens.each_cons(2) do |t1, t2|
next unless kind(t2)
next unless space_missing?(t1, t2)
next if space_required_after?(t1)
- buffer = processed_source.buffer
- pos_before_punctuation = Parser::Source::Range.new(buffer,
- t1.pos.end_pos,
- t2.pos.begin_pos)
+ pos_before_punctuation = range_between(t1.pos.end_pos,
+ t2.pos.begin_pos)
yield t2, pos_before_punctuation
end
end