must pass mutable local variables into Thread.new

see http://stackoverflow.com/q/16745840 for details