diff options
author | Kevin Newton <[email protected]> | 2024-10-15 10:06:50 -0400 |
---|---|---|
committer | Kevin Newton <[email protected]> | 2024-10-16 14:31:26 -0400 |
commit | 5eca11ca5e5503e41b7ec81f03e63c59556c038c (patch) | |
tree | d3318069ad963bbb4e4bacc9cd457cbc7eff8b97 /iseq.c | |
parent | 78fb1ab84b78596fac6a219c66c1d897aba346bb (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.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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)) { |