summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index 853fadf5b0..725c65b451 100644
--- a/compile.c
+++ b/compile.c
@@ -2006,8 +2006,11 @@ iseq_set_use_block(rb_iseq_t *iseq)
body->param.flags.use_block = 1;
rb_vm_t *vm = GET_VM();
- st_data_t key = (st_data_t)rb_intern_str(body->location.label); // String -> ID
- st_insert(vm->unused_block_warning_table, key, 1);
+
+ if (!vm->unused_block_warning_strict) {
+ st_data_t key = (st_data_t)rb_intern_str(body->location.label); // String -> ID
+ st_insert(vm->unused_block_warning_table, key, 1);
+ }
}
}