lib/asciidoctor/converter/template.rb in asciidoctor-2.0.7 vs lib/asciidoctor/converter/template.rb in asciidoctor-2.0.8

- old
+ new

@@ -32,12 +32,12 @@ haml: { format: :xhtml, attr_wrapper: '"', escape_attrs: false, ugly: true }, slim: { disable_escape: true, sort_attrs: false, pretty: false }, } begin - require 'concurrent/hash' unless defined? ::Concurrent::Hash - @caches = { scans: ::Concurrent::Hash.new, templates: ::Concurrent::Hash.new } + require 'concurrent/map' unless defined? ::Concurrent::Map + @caches = { scans: ::Concurrent::Map.new, templates: ::Concurrent::Map.new } rescue ::LoadError @caches = { scans: {}, templates: {} } end def self.caches @@ -69,10 +69,10 @@ (@engine_options[engine] ||= {}).update override_opts end end case opts[:template_cache] when true - logger.warn 'optional gem \'concurrent-ruby\' is not available. This gem is recommended when using the default template cache.' unless defined? ::Concurrent::Hash + logger.warn 'optional gem \'concurrent-ruby\' is not available. This gem is recommended when using the default template cache.' unless defined? ::Concurrent::Map @caches = self.class.caches when ::Hash @caches = opts[:template_cache] else @caches = {} # the empty Hash effectively disables caching