From 836171d92958d7796af246640a0d8091691fcdaf Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sat, 13 Apr 2019 00:11:08 +0200 Subject: Fix compatibility with Asciidoctor 2.0.x --- lib/asciidoctor/interdoc_reftext/resolver.rb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/asciidoctor/interdoc_reftext/resolver.rb b/lib/asciidoctor/interdoc_reftext/resolver.rb index 0f9a7c1..cc32fd6 100644 --- a/lib/asciidoctor/interdoc_reftext/resolver.rb +++ b/lib/asciidoctor/interdoc_reftext/resolver.rb @@ -135,14 +135,7 @@ module Asciidoctor::InterdocReftext # @param input [Enumerable, String] lines of the AsciiDoc document to load. # @return [Asciidoctor::Document] a parsed document. def asciidoc_load(input) - # Asciidoctor is dumb. It doesn't know enumerators and when we give it - # an Array, it calls #dup on it. At least it knows #readlines, so we just - # define it as an alias for #to_a. - if input.is_a?(::Enumerable) && !input.respond_to?(:readlines) - input.singleton_class.send(:alias_method, :readlines, :to_a) - end - - ::Asciidoctor.load(input, @document.options) + ::Asciidoctor.load(input.to_a, @document.options) end end end -- cgit v1.2.3