summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2021-05-08 23:58:49 -0600
committerDan Allen <dan.j.allen@gmail.com>2021-05-09 01:20:02 -0600
commitbf28fe216d3e928d85a3e985a2da7a3ec48ffaba (patch)
treec470a5c794399b16e881ce31aabb551934bcc1df /lib
parent9edce86e61ee1dbd6b7eea59e42f29bdabf6993c (diff)
use .to_s instead of interpolation to convert value to string
Diffstat (limited to 'lib')
-rw-r--r--lib/asciidoctor/block.rb3
-rw-r--r--lib/asciidoctor/document.rb4
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/asciidoctor/block.rb b/lib/asciidoctor/block.rb
index fba49e74..ef098630 100644
--- a/lib/asciidoctor/block.rb
+++ b/lib/asciidoctor/block.rb
@@ -68,8 +68,7 @@ class Block < AbstractBlock
# subs attribute is not honored
else
@default_subs = nil
- # interpolation is the fastest way to dup subs as a string
- @attributes['subs'] = %(#{subs})
+ @attributes['subs'] = subs.to_s
end
# resolve the subs eagerly only if subs option is specified
# QUESTION should we skip subsequent calls to commit_subs?
diff --git a/lib/asciidoctor/document.rb b/lib/asciidoctor/document.rb
index 196ba5b4..b37746d5 100644
--- a/lib/asciidoctor/document.rb
+++ b/lib/asciidoctor/document.rb
@@ -401,11 +401,11 @@ class Document < AbstractBlock
# allow common attributes backend and doctype to be set using options hash, coerce values to string
if (backend_val = options[:backend])
- attr_overrides['backend'] = %(#{backend_val})
+ attr_overrides['backend'] = backend_val.to_s
end
if (doctype_val = options[:doctype])
- attr_overrides['doctype'] = %(#{doctype_val})
+ attr_overrides['doctype'] = doctype_val.to_s
end
if @safe >= SafeMode::SERVER