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 859018e5c1..526f476deb 100644
--- a/string.c
+++ b/string.c
@@ -8540,6 +8540,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;