Skip to content

Commit

Permalink
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 4 additions & 3 deletions core/src/main/java/org/jruby/lexer/yacc/RubyLexer.java
Original file line number Diff line number Diff line change
@@ -298,11 +298,12 @@ public void heredoc_dedent(Node root) {
} else if (root instanceof ListNode) {
ListNode list = (ListNode) root;
int length = list.size();
// FIXME: I need a test case to see how this fails because MRI has bol (begin of line) boolean when
// it encounters non-str/dstr nodes but I am missing the knowledge to understand why it is needed
// and our layout is not as general as theirs so I cannot just nd->lit.
int currentLine = -1;
for (int i = 0; i < length; i++) {
Node child = list.get(i);
if (currentLine == child.getLine()) continue; // Only process first element on a line?

currentLine = child.getLine(); // New line

if (child instanceof StrNode) {
dedent_string(((StrNode) child).getValue(), indent);
1 change: 0 additions & 1 deletion test/mri/excludes/TestSyntax.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
exclude :test__END___cr, "needs investigation"
exclude :test_constant_reassignment_nested, "needs investigation"
exclude :test_constant_reassignment_toplevel, "needs investigation"
exclude :test_dedented_heredoc_with_interpolated_string, "needs investigation"
exclude :test_defined_empty_argument, "needs investigation"
exclude :test_duplicated_when, "needs investigation"
exclude :test_error_message_encoding, "#2127"

0 comments on commit f568b8d

Please sign in to comment.