I don't think these two lines are correct.  The original would return true for either an explicit HASH reference, or for any object that is a blessed HASH.  (This is the intended behavior.)  The new version will return false for a blessed hash because ref($self) will be defined in that case, but will be the name of the package, so will not equal `'HASH'`.  In particular, `isHash()` used to return true for any MathObject, but now will return false.  

The whole point of this routine was to return true for blessed HASHes in addition to explicit ones.  Otherwise a simple `ref($self) eq "HASH"` would be sufficient.