summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-08-30 22:11:00 -0700
committerJeremy Evans <code@jeremyevans.net>2019-08-30 22:11:00 -0700
commit60a08d9a6c11fda25bb73ded9e26aabc57af9433 (patch)
treec4fafffd8281cb5edb807a0e8e6af86dba7a0537 /proc.c
parentec6206a81a1d61efe5bda69ab704c09e75033c01 (diff)
downloadruby-60a08d9a6c11fda25bb73ded9e26aabc57af9433.tar.gz
Add rb_iseq_location
This wraps iseq_location and should fix the leaked global test.
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/proc.c b/proc.c
index 4d180f897e..19ce7a1d19 100644
--- a/proc.c
+++ b/proc.c
@@ -1183,7 +1183,7 @@ rb_proc_get_iseq(VALUE self, int *is_proc)
return NULL;
}
-MJIT_FUNC_EXPORTED VALUE
+static VALUE
iseq_location(const rb_iseq_t *iseq)
{
VALUE loc[2];
@@ -1196,6 +1196,12 @@ iseq_location(const rb_iseq_t *iseq)
return rb_ary_new4(2, loc);
}
+MJIT_FUNC_EXPORTED VALUE
+rb_iseq_location(const rb_iseq_t *iseq)
+{
+ return iseq_location(iseq);
+}
+
/*
* call-seq:
* prc.source_location -> [String, Integer]