Dne 13.12.2013 13:36, Josef Reidinger napsal(a):
The third one is about quite old feature in yaml, which is still not widely known http://blog.envylabs.com/post/65339158741/keeping-your-yaml-clean which helps to keep yaml file shorted.
JFYI: Ruby uses references in YAML automatically if possible:
a = { :a => 1, :b => 2 } puts [ a, a, a ].to_yaml
The results is:
--- - &8730460 :a: 1 :b: 2 - *8730460 - *8730460
So if you save the save object several times it will be serialized just once and referenced (the "same" here means the same object_id, e.g. different Hash-es although with the same content won't be referenced as they are not the same objects).
--
Best Regards
Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/