lib/scaffolder/region/sequence.rb in scaffolder-0.4.2 vs lib/scaffolder/region/sequence.rb in scaffolder-0.4.3

- old
+ new

@@ -65,13 +65,11 @@ return inserts.sort.reverse.inject(raw_sequence) do |seq,insert| raise CoordinateError if insert.open > raw_sequence.length raise CoordinateError if insert.close < 1 raise CoordinateError if insert.open > insert.close - before_size = seq.length seq[insert.position] = insert.sequence - diff = seq.length - before_size - stop(stop + diff) + @stop += insert.size_diff seq end end end