But there is a way out of this. Yehuda and I talked a bit about it and > realized that if we could inspect the target method whenever we're > calling a block, we could determine whether a full heap scope would be > needed. There are only three constructs that would trigger this > potential: > > * A block argument (&arg) in the parameter list, because it's > capturing the block for later use > * A zsuper call (no-arg, no-parens super), because that call could > capture the block for later use > * If the call itself is Proc.new, proc, or lambda, because it's > capturing the block (or -> in 1.9) > * Any eval-like call (binding, eval)
Also send with a target that is not resolveable at compile time + any aliased method calls that might resolve to an eval or a send. -S.
