summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--prism_compile.c2
-rw-r--r--spec/prism.mspec4
2 files changed, 1 insertions, 5 deletions
diff --git a/prism_compile.c b/prism_compile.c
index a53d94f5c2..9207f7a5f5 100644
--- a/prism_compile.c
+++ b/prism_compile.c
@@ -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;
diff --git a/spec/prism.mspec b/spec/prism.mspec
index 3014b9788f..42956c6e7b 100644
--- a/spec/prism.mspec
+++ b/spec/prism.mspec
@@ -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")