diff --git a/lib/mutant/matcher/method/instance.rb b/lib/mutant/matcher/method/instance.rb index 1b965fa0..cae40be9 100644 --- a/lib/mutant/matcher/method/instance.rb +++ b/lib/mutant/matcher/method/instance.rb @@ -7,7 +7,7 @@ module Mutant class Instance < self SUBJECT_CLASS = Subject::Method::Instance - # Dispatching builder, detects adamantium case + # Dispatching builder, detects memoizable case # # @param [Cache] cache # @param [Class, Module] scope @@ -19,7 +19,7 @@ module Mutant # def self.build(cache, scope, method) name = method.name - if scope.ancestors.include?(::Adamantium) and scope.memoized?(name) + if scope.ancestors.include?(::Memoizable) and scope.memoized?(name) return Memoized.new(cache, scope, method) end super diff --git a/mutant.gemspec b/mutant.gemspec index d3bb06dc..bcf382cd 100644 --- a/mutant.gemspec +++ b/mutant.gemspec @@ -31,6 +31,7 @@ Gem::Specification.new do |gem| gem.add_runtime_dependency('ice_nine', '~> 0.11.0') gem.add_runtime_dependency('descendants_tracker', '~> 0.0.1') gem.add_runtime_dependency('adamantium', '~> 0.2.0') + gem.add_runtime_dependency('memoizable', '~> 0.4.2') gem.add_runtime_dependency('equalizer', '~> 0.0.7') gem.add_runtime_dependency('inflecto', '~> 0.0.2') gem.add_runtime_dependency('anima', '~> 0.2.0')