Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -89,6 +89,9 @@ private static SourceSection enclosing(SourceSection base, RubyNode[] sequence)
length += base.getSource().getLineLength(n) + 1;
}

length = Math.min(length, base.getSource().getLength() - index);
length = Math.max(0, length);

return base.getSource().createSection(base.getIdentifier(), index, length);
}

0 comments on commit 4c72563

Please sign in to comment.