lib/mocha/parameter_matchers/instance_methods.rb in mocha-2.4.1 vs lib/mocha/parameter_matchers/instance_methods.rb in mocha-2.4.2

- old
+ new

@@ -6,12 +6,12 @@ module ParameterMatchers # @private module InstanceMethods # @private def to_matcher(expectation: nil, top_level: false) - if is_a?(Base) + if Base === self self - elsif is_a?(Hash) && top_level + elsif Hash === self && top_level Mocha::ParameterMatchers::PositionalOrKeywordHash.new(self, expectation) else Mocha::ParameterMatchers::Equals.new(self) end end