summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/string.c b/string.c
index 56b27d9d75..28b1efa2e9 100644
--- a/string.c
+++ b/string.c
@@ -8506,6 +8506,7 @@ sym_to_proc(VALUE sym)
}
else {
proc = rb_proc_new(sym_call, (VALUE)id);
+ rb_block_clear_env_self(proc);
aryp[index] = sym;
aryp[index + 1] = proc;
return proc;