I think there is a problem with the core_matchers code. For the "order" matters maps this code will not check key order. I think my new code will handle this case.

I don't quite understand your comment. Null values should count in the length, and as long as null != null returns false I think this code will indicate if the two maps are different. I don't see where the core_matchers code does anything different for null values. Please explain.