diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2017-03-17 17:37:41 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2017-03-17 17:37:41 -0600 |
| commit | 579029559cb55afea7f5c30ee47cf69cd85913ed (patch) | |
| tree | f922feccb423c801f4724d33695a5e62ba39b8c4 | |
| parent | ee01bb441f630072c71b00a65fd160c77571d884 (diff) | |
only unfreeze VALID_OPTIONS if frozen
| -rw-r--r-- | lib/asciidoctor-pdf/prawn-templates_ext.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/asciidoctor-pdf/prawn-templates_ext.rb b/lib/asciidoctor-pdf/prawn-templates_ext.rb index 74ab380e..626f0c03 100644 --- a/lib/asciidoctor-pdf/prawn-templates_ext.rb +++ b/lib/asciidoctor-pdf/prawn-templates_ext.rb @@ -1,3 +1,5 @@ # unfreeze Prawn::Document::VALID_OPTIONS for prawn-templates -Prawn::Document.const_set :VALID_OPTIONS, (Prawn::Document.send :remove_const, :VALID_OPTIONS).dup +class Prawn::Document + const_set :VALID_OPTIONS, (send :remove_const, :VALID_OPTIONS).dup if VALID_OPTIONS.frozen? +end require 'prawn/templates' |
