From: Stefano Rivera <stefanor@debian.org>
Date: Sat, 19 May 2018 22:27:57 +0200
Subject: Use hashery's LRU implementation

We don't have ruby-rufus-lru in the archive, but hashery's implementation is
sufficiently compatible.
Last-Update: 2016-07-25
Forwarded: not-needed
---
 foodcritic.gemspec    | 2 +-
 lib/foodcritic/api.rb | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/foodcritic.gemspec b/foodcritic.gemspec
index aabbcf9..ff665a2 100644
--- a/foodcritic.gemspec
+++ b/foodcritic.gemspec
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
   s.add_dependency("treetop", "~> 1.4")
   s.add_dependency("ffi-yajl", "~> 2.0")
   s.add_dependency("erubis")
-  s.add_dependency("rufus-lru", "~> 1.0")
+  s.add_dependency("hashery")
 
   s.add_development_dependency "rspec", "~> 3.5"
   s.add_development_dependency "fuubar", "~> 2.0"
diff --git a/lib/foodcritic/api.rb b/lib/foodcritic/api.rb
index 74349fc..cb14565 100644
--- a/lib/foodcritic/api.rb
+++ b/lib/foodcritic/api.rb
@@ -1,5 +1,5 @@
 require "nokogiri"
-require "rufus-lru"
+require "hashery/lru_hash"
 
 module FoodCritic
   # Helper methods that form part of the Rules DSL.
@@ -256,7 +256,7 @@ module FoodCritic
 
     # Read the AST for the given Ruby source file
     def read_ast(file)
-      @ast_cache ||= Rufus::Lru::Hash.new(5)
+      @ast_cache ||= Hashery::LRUHash.new(5)
       if @ast_cache.include?(file)
         @ast_cache[file]
       else
