Better patch for MacRuby bug

Better patch for MacRuby bug 204. Previous attempt (677b1e02b2e97940bb7dddf3de63cd753b2b10c2) introduces a bug for dynamic tasks. See issue 144

All my tests now pass. Can someone please verify that this still addresses the issue found by Christian Niles christian@nerdyc.com ?

(Please ignore previous attempt to submit this patch)