In this commit which was part of #660 and was released in v2.4.3, the new code didn't take into account that the parameter local variable in HasEntries#matches? can be nil if the stubbed method expects a Hash or keyword arguments but is called with no arguments.
Previously this wasn't a problem, because the nil was handled by this guard condition in HasEntry#matches?. However, now we're calling #length on parameter when exact is true, we need this new guard condition in HasEntries#matches?.
In this commit which was part of #660 and was released in v2.4.3, the new code didn't take into account that the
parameter
local variable inHasEntries#matches?
can benil
if the stubbed method expects aHash
or keyword arguments but is called with no arguments.Previously this wasn't a problem, because the
nil
was handled by this guard condition inHasEntry#matches?
. However, now we're calling#length
onparameter
whenexact
istrue
, we need this new guard condition inHasEntries#matches?
.Fixes #662.