fix Heap#foreach
Merge pull request #242 from xuwei-k/Heap-foreach

fix Heap#foreach