Skip to content

Commit 49d4e1e

Browse files
author
Burkhard Vogel-Kreykenbohm
committed
reset VALID_OPTIONS without warnings
1 parent 985cdfa commit 49d4e1e

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

lib/prawn/templates.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,13 @@ def load_object_graph(hash, object)
273273
end
274274

275275
if Prawn::Document::VALID_OPTIONS.frozen?
276-
Prawn::Document::VALID_OPTIONS =
277-
(Prawn::Document::VALID_OPTIONS.dup << :template).freeze
276+
Prawn::Document.const_set(
277+
:VALID_OPTIONS,
278+
(Prawn::Document.send(
279+
:remove_const,
280+
:VALID_OPTIONS
281+
).dup << :template).freeze
282+
)
278283
else
279284
Prawn::Document::VALID_OPTIONS << :template
280285
end

0 commit comments

Comments
 (0)