diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2019-04-01 00:23:24 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2019-04-01 00:23:24 -0600 |
| commit | 5c32e8826a326a3363acb91bdb72ed90d5c4fcbb (patch) | |
| tree | 8a4c816867eeffcf7b5ef43a975677f87c6a7342 | |
| parent | b299b69badd87d060a787bafc907d101072d4a72 (diff) | |
update CLI and SyntaxHighlighter to allow Asciidoctor to load cleanly on Ruby 2.0 - 2.2
| -rw-r--r-- | CHANGELOG.adoc | 1 | ||||
| -rw-r--r-- | lib/asciidoctor/syntax_highlighter.rb | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 41c9e76c..0df52279 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -19,6 +19,7 @@ Bug Fixes:: * fix crash when source highlighter is Rouge and source language is not set on block (#3223) * make Asciidoctor::SyntaxHighlighter::Config.register_for method public as documented + * update CLI and SyntaxHighlighter to allow Asciidoctor to load cleanly on Ruby 2.0 - 2.2 == 2.0.4 (2019-03-31) - @mojavelinux diff --git a/lib/asciidoctor/syntax_highlighter.rb b/lib/asciidoctor/syntax_highlighter.rb index e9200b84..339862dc 100644 --- a/lib/asciidoctor/syntax_highlighter.rb +++ b/lib/asciidoctor/syntax_highlighter.rb @@ -95,7 +95,7 @@ module SyntaxHighlighter private_class_method def self.included into into.extend Config - end + end || :included module Config # Public: Statically register the current class in the registry for the specified names. @@ -139,7 +139,9 @@ module SyntaxHighlighter end end - private def registry + private + + def registry raise ::NotImplementedError, %(#{Factory} subclass #{self.class} must implement the ##{__method__} method) end end @@ -151,7 +153,9 @@ module SyntaxHighlighter @registry = seed_registry || {} end - private def registry + private + + def registry @registry end end |
