diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2019-04-13 00:11:08 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2019-04-13 00:11:54 +0200 |
commit | 836171d92958d7796af246640a0d8091691fcdaf (patch) | |
tree | d54aff380caf4be8299122150b60edb809a45be3 /lib/asciidoctor/interdoc_reftext/resolver.rb | |
parent | 49f1686e7faa41a1c79a95e941c845ea1d5095c3 (diff) |
Fix compatibility with Asciidoctor 2.0.x
Diffstat (limited to 'lib/asciidoctor/interdoc_reftext/resolver.rb')
-rw-r--r-- | lib/asciidoctor/interdoc_reftext/resolver.rb | 9 |
1 files changed, 1 insertions, 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>, 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 |