Rubocop fix: Perfomance/UnfreezeString
(#26217)
This commit is contained in:
@ -2,6 +2,13 @@
|
||||
|
||||
doc = Ox::Document.new(version: '1.0')
|
||||
|
||||
ins = Ox::Instruct.new(:xml).tap do |instruct|
|
||||
instruct[:version] = '1.0'
|
||||
instruct[:encoding] = 'UTF-8'
|
||||
end
|
||||
|
||||
doc << ins
|
||||
|
||||
doc << Ox::Element.new('XRD').tap do |xrd|
|
||||
xrd['xmlns'] = 'http://docs.oasis-open.org/ns/xri/xrd-1.0'
|
||||
|
||||
@ -11,4 +18,4 @@ doc << Ox::Element.new('XRD').tap do |xrd|
|
||||
end
|
||||
end
|
||||
|
||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>#{Ox.dump(doc, effort: :tolerant)}".force_encoding('UTF-8')
|
||||
Ox.dump(doc, effort: :tolerant).force_encoding('UTF-8')
|
||||
|
Reference in New Issue
Block a user