Skip to content

Commit

Permalink
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -404,7 +404,7 @@ public RubyNode visitBlockNode(org.jruby.ast.BlockNode node) {

length = Math.min(length + startIndex, sourceSection.getSource().getLength()) - startIndex;

ret = sequence(context, sourceSection.getSource().createSection(sourceSection.getIdentifier(), startIndex, length), translatedChildren);
ret = sequence(context, sourceSection.getSource().createSection(getIdentifier(), startIndex, length), translatedChildren);
}

return addNewlineIfNeeded(node, ret);
Original file line number Diff line number Diff line change
@@ -401,7 +401,7 @@ private TranslatorState(LexicalScope scope, Deque<SourceSection> parentSourceSec
}
}

private static SourceSection considerExtendingMethodToCoverEnd(SourceSection sourceSection) {
private SourceSection considerExtendingMethodToCoverEnd(SourceSection sourceSection) {
if (sourceSection == null) {
return sourceSection;
}
@@ -418,7 +418,7 @@ private static SourceSection considerExtendingMethodToCoverEnd(SourceSection sou
for (;;) {
final String lineAfterString = source.getCode(lineAfter).replaceAll("\\s+$","");
if (lineAfterString.equals(indentationOnFirstLine + "end") || lineAfterString.equals(indentationOnFirstLine + "}")) {
return source.createSection(sourceSection.getIdentifier(), sourceSection.getCharIndex(), sourceSection.getCharLength() + 1 + source.getLineLength(lineAfter));
return source.createSection(getIdentifier(), sourceSection.getCharIndex(), sourceSection.getCharLength() + 1 + source.getLineLength(lineAfter));
}
if (++lineAfter >= source.getLineCount()) {
return sourceSection;
Original file line number Diff line number Diff line change
@@ -117,7 +117,7 @@ public static SourceSection enclosing(String identifier, SourceSection base, Sou
length = Math.min(length, base.getSource().getLength() - index);
length = Math.max(0, length);

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

public static SourceSection enclosing(String identifier, SourceSection base, RubyNode[] sequence) {

0 comments on commit 887c928

Please sign in to comment.