[PRISM] Emit END event for modules

This commit is contained in:
Kevin Newton 2024-05-17 10:35:30 -04:00
Родитель 0649c1e3bc
Коммит c60cdbdc98
2 изменённых файлов: 1 добавлений и 5 удалений

Просмотреть файл

@ -8745,7 +8745,7 @@ pm_compile_node(rb_iseq_t *iseq, const pm_node_t *node, LINK_ANCHOR *const ret,
break;
}
if (PM_NODE_TYPE_P(scope_node->ast_node, PM_CLASS_NODE)) {
if (PM_NODE_TYPE_P(scope_node->ast_node, PM_CLASS_NODE) || PM_NODE_TYPE_P(scope_node->ast_node, PM_MODULE_NODE)) {
const pm_line_column_t end_location = PM_NODE_END_LINE_COLUMN(scope_node->parser, scope_node->ast_node);
ADD_TRACE(ret, RUBY_EVENT_END);
ISEQ_COMPILE_DATA(iseq)->last_line = end_location.line;

Просмотреть файл

@ -1,8 +1,4 @@
# frozen_string_literal: true
# We are missing emitting some :end event inside eval; we need more
# investigation here.
MSpec.register(:exclude, "TracePoint#path equals \"(eval at __FILE__:__LINE__)\" inside an eval for :end event")
# We need to respect the eval coverage setting.
MSpec.register(:exclude, "Coverage.result returns the correct results when eval coverage is disabled")