summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2024-10-15 10:06:50 -0400
committerKevin Newton <[email protected]>2024-10-16 14:31:26 -0400
commit5eca11ca5e5503e41b7ec81f03e63c59556c038c (patch)
treed3318069ad963bbb4e4bacc9cd457cbc7eff8b97 /iseq.c
parent78fb1ab84b78596fac6a219c66c1d897aba346bb (diff)
RubyVM::InstructionSequence.of Thread::Backtrace::Location
This would be useful for debugging.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11896
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/iseq.c b/iseq.c
index a60228c8e5..8c8e54b989 100644
--- a/iseq.c
+++ b/iseq.c
@@ -3029,7 +3029,10 @@ iseqw_s_of(VALUE klass, VALUE body)
{
const rb_iseq_t *iseq = NULL;
- if (rb_obj_is_proc(body)) {
+ if (rb_frame_info_p(body)) {
+ iseq = rb_get_iseq_from_frame_info(body);
+ }
+ else if (rb_obj_is_proc(body)) {
iseq = vm_proc_iseq(body);
if (!rb_obj_is_iseq((VALUE)iseq)) {