From dfba87cd622f9699f54d1d0b8c057deb428874b6 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Tue, 8 Jun 2021 17:34:08 +0900 Subject: Make it possible to get AST::Node from Thread::Backtrace::Location RubyVM::AST.of(Thread::Backtrace::Location) returns a node that corresponds to the location. Typically, the node is a method call, but not always. This change also includes iseq's dump/load support of node_ids for each instructions. --- iseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iseq.c') diff --git a/iseq.c b/iseq.c index 1609432770..26c59b8cbb 100644 --- a/iseq.c +++ b/iseq.c @@ -2998,7 +2998,7 @@ iseq_data_to_ary(const rb_iseq_t *iseq) INT2FIX(iseq_body->location.code_location.end_pos.lineno), INT2FIX(iseq_body->location.code_location.end_pos.column))); #ifdef EXPERIMENTAL_ISEQ_NODE_ID - rb_hash_aset(misc, ID2SYM(rb_intern("node_ids_for_each_insn")), node_ids); + rb_hash_aset(misc, ID2SYM(rb_intern("node_ids")), node_ids); #endif /* -- cgit v1.2.3