diff --git a/lib/mutant/matcher/method/instance.rb b/lib/mutant/matcher/method/instance.rb index b351df3e..cceed857 100644 --- a/lib/mutant/matcher/method/instance.rb +++ b/lib/mutant/matcher/method/instance.rb @@ -16,7 +16,8 @@ module Mutant # @api private # def self.build(cache, scope, method) - if scope.ancestors.include?(::Adamantium) and scope.memoized?(method.name) + name = method.name + if scope.ancestors.include?(::Adamantium) and scope.memoized?(name) return Memoized.new(cache, scope, method) end super