You can clone with
In the current gem release (0.7.2) Utility.array_to_s is broken when used with frozen strings. I've fixed it in daf1cd0
It might be good to do a bug fix release soon.
I'm curious about 2 things with this:
You are right that dup would create a new String instance for each string. I've fixed the code so that only frozen strings will be duplicated: 9829802
That is a very good question. I couldn't really pinpoint it in my code. I suspect that nokogiri returns frozen strings after parsing XML in certain cases (I use nokogiri).
But I think regardless of the usecase, frozen strings should work. Also, I mostly view tags as output methods. They should not attempt to modify anything we pass in, imho.