Hi, there
Is there any way to make YAML alias same strings in dumps? The following
code fragment:
require ‘yaml’
s = ‘a’ * 10
puts [ s, s ].to_yaml
Produces this:
- aaaaaaaaaa
- aaaaaaaaaa
While I need:
- &id001 aaaaaaaaaa
- *id001
Interestingly, if I define s as:
s = [ ‘a’ * 10 ]
The output is aliased just fine:
- &id001
- aaaaaaaaaa
- *id001
Thanks,
Gennady.