ensure closed-over $resource variable is weak
Merge pull request #16 from cafe01/master

ensure closed-over $resource variable is weak