diff --git a/lib/rubocop/isucon/memorize_methods.rb b/lib/rubocop/isucon/memorize_methods.rb index 981b48e0..17597207 100644 --- a/lib/rubocop/isucon/memorize_methods.rb +++ b/lib/rubocop/isucon/memorize_methods.rb @@ -30,7 +30,7 @@ def #{method_name}_with_cache end RUBY - alias_method "#{method_name}_without_cache", method_name + alias_method :"#{method_name}_without_cache", method_name alias_method method_name, "#{method_name}_with_cache" end end diff --git a/rubocop-isucon.gemspec b/rubocop-isucon.gemspec index 14603c70..4262af90 100644 --- a/rubocop-isucon.gemspec +++ b/rubocop-isucon.gemspec @@ -38,7 +38,7 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency "activerecord", ">= 6.1.0" spec.add_runtime_dependency "gda", "!= 1.1.2" spec.add_runtime_dependency "rubocop", ">= 1.49.0" - spec.add_runtime_dependency "rubocop-performance" + spec.add_runtime_dependency "rubocop-performance", ">= 1.20.0" spec.add_development_dependency "benchmark-ips" spec.add_development_dependency "pry-byebug"