diff --git a/test/yarp/fuzzer_test.rb b/test/yarp/fuzzer_test.rb index 384f3ff0d2..d75d1422f0 100644 --- a/test/yarp/fuzzer_test.rb +++ b/test/yarp/fuzzer_test.rb @@ -22,5 +22,11 @@ module YARP snippet "incomplete escaped list", "%w[\\" snippet "incomplete escaped regex", "/a\\" snippet "unterminated heredoc with unterminated escape at end of file", "<location.start < node->base.location.start) { node->base.location.start = statement->location.start; } + if (statement->location.end > node->base.location.end) { + node->base.location.end = statement->location.end; + } yp_node_list_append(&node->body, statement); - node->base.location.end = statement->location.end; // Every statement gets marked as a place where a newline can occur. statement->flags |= YP_NODE_FLAG_NEWLINE;