From: Green Eco Date: 2013-08-06T17:41:00+02:00 Subject: Saving with yaml Hi, I have a question. :-) I have already found a lot in the web but that does not really helped me. This far my code looks like this: to save: require "yaml" @characters = ["Molly", "Trade"] @saves = {location: "Southeaster", hunger: 10, life: 76 } @settings = {display: "1360*960", render: "high", saves: "manual" } output = File.new("Saves.yaml", "w") do |file| YAML.dump end output.write YAML.dump(@characters) # Wie sichert man mehrere Sachen?????? output.close and to load: require "yaml" output = File.new("Saves.yaml", "r") p YAML.load(output.read) output.close How can I save multiple array etc.? It works but I want to save more than one hash, I want to save e.g. all of them, but with that I can save just one or if I manage it to save all three I can just load the first one. So it would be nice if someone could help me. :-) Thanks Yours faithfully Greeneco -- Posted via http://www.ruby-forum.com/. _______________________________________________ ruby-talk mailing list ruby-talk@ruby-lang.org http://lists.ruby-lang.org/cgi-bin/mailman/listinfo/ruby-talk