When ssml_doc.embed(original_doc) is used to embed one document within another, the original document is left modified unexpectedly. This is exhibited in the following tests: sfgeorge/ruby_speech@539d2cc...bug;destructive-embed
Here's an example using ruby_speech 2.3.1...
require'ruby_speech'original_doc=RubySpeech::SSML.drawdostring"Hi, I'm Fred. The time is currently "say_as:interpret_as=>'date',:format=>'dmy'do"01/02/1960"endendputsoriginal_doc# => <speak xmlns="http://www.w3.org/2001/10/synthesis" version="1.0" xml:lang="en-US">Hi, I'm Fred. The time is currently <say-as interpret-as="date" format="dmy">01/02/1960</say-as></speak>doc2=RubySpeech::SSML.drawdovoice:gender=>:male,:name=>'fred'doembedoriginal_docendendputsoriginal_doc# => <speak xmlns="http://www.w3.org/2001/10/synthesis" version="1.0" xml:lang="en-US">Hi, I'm Fred. The time is currently </speak>
When
ssml_doc.embed(original_doc)is used to embed one document within another, the original document is left modified unexpectedly. This is exhibited in the following tests: sfgeorge/ruby_speech@539d2cc...bug;destructive-embedHere's an example using ruby_speech 2.3.1...