summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/compile.c b/compile.c
index 78d2fd4dd0..7a88f81daa 100644
--- a/compile.c
+++ b/compile.c
@@ -9123,11 +9123,9 @@ rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc, VALUE locals, VALUE params,
/* for parser */
int
-rb_dvar_defined(ID id, const struct rb_block *base_block)
+rb_dvar_defined(ID id, const rb_iseq_t *iseq)
{
- const rb_iseq_t *iseq;
-
- if (base_block && (iseq = vm_block_iseq(base_block)) != NULL) {
+ if (iseq) {
const struct rb_iseq_constant_body *body = iseq->body;
while (body->type == ISEQ_TYPE_BLOCK ||
body->type == ISEQ_TYPE_RESCUE ||
@@ -9150,11 +9148,9 @@ rb_dvar_defined(ID id, const struct rb_block *base_block)
}
int
-rb_local_defined(ID id, const struct rb_block *base_block)
+rb_local_defined(ID id, const rb_iseq_t *iseq)
{
- const rb_iseq_t *iseq;
-
- if (base_block && (iseq = vm_block_iseq(base_block)) != NULL) {
+ if (iseq) {
unsigned int i;
const struct rb_iseq_constant_body *const body = iseq->body->local_iseq->body;