mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
merge revision(s) 45576: [Backport #11572]
* string.c (sym_to_proc), proc.c (rb_block_clear_env_self): clear caller's self which is useless, so that it can get collected. [Fixes GH-592] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@52362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
24d44aeb02
commit
a6b6f9bb59
5 changed files with 20 additions and 1 deletions
1
string.c
1
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue