зеркало из https://github.com/github/ruby.git
proc.c: fix symbol proc mark
* proc.c (proc_mark): block.ep of Proc from Symbol is now NULL. [ruby-core:70961] [Bug #11560] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
c90550c251
Коммит
63c7d9111c
|
@ -1,3 +1,8 @@
|
|||
Fri Oct 2 00:18:39 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* proc.c (proc_mark): block.ep of Proc from Symbol is now NULL.
|
||||
[ruby-core:70961] [Bug #11560]
|
||||
|
||||
Wed Sep 30 15:47:13 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* vm_args.c (vm_caller_setup_arg_block): bypass Symbol#to_proc
|
||||
|
|
4
proc.c
4
proc.c
|
@ -48,7 +48,9 @@ proc_mark(void *ptr)
|
|||
rb_proc_t *proc = ptr;
|
||||
RUBY_MARK_UNLESS_NULL(proc->block.proc);
|
||||
RUBY_MARK_UNLESS_NULL(proc->block.self);
|
||||
RUBY_MARK_UNLESS_NULL(rb_vm_proc_envval(proc));
|
||||
if (proc->block.ep) {
|
||||
RUBY_MARK_UNLESS_NULL(rb_vm_proc_envval(proc));
|
||||
}
|
||||
if (proc->block.iseq && RUBY_VM_IFUNC_P(proc->block.iseq)) {
|
||||
rb_gc_mark((VALUE)(proc->block.iseq));
|
||||
}
|
||||
|
|
|
@ -122,6 +122,11 @@ class TestSymbol < Test::Unit::TestCase
|
|||
GC.stress = true
|
||||
true.tap(&:itself)
|
||||
end;
|
||||
|
||||
assert_ruby_status([], <<-"end;", timeout: 0.1)
|
||||
GC.stress = true
|
||||
100.times {Proc.new(&:itself)}
|
||||
end;
|
||||
end
|
||||
|
||||
def test_call
|
||||
|
|
Загрузка…
Ссылка в новой задаче