From: Gary Yngve Date: 2009-03-03T08:18:40+09:00 Subject: Re: Using YAML for inter-process communication - anything built-in ? You're missing the '---' header in these examples. YAML may behave more robustly with the header. Check out FastYAML on github. It's way faster than YAML, doesn't use Syck, and is way more robust than YAML. -Gary On Mar 2, 1:34 pm, Brian Candler wrote: > irb(main):001:0> require "yaml" > => true > irb(main):002:0> YAML.load("foo:bar\nbaz:") > => "foo:bar baz:" > irb(main):003:0> YAML.load("foo:bar\nbaz:\n") > => {"foo:bar baz"=>nil} > irb(main):004:0> YAML.load("foo:bar\nbaz:bap\n") > => "foo:bar baz:bap" > irb(main):005:0> YAML.load("foo: bar\nbaz:bap\n") > ArgumentError: syntax error on line 2, col -1: `' >   from /usr/local/lib/ruby/1.8/yaml.rb:133:in `load' >   from /usr/local/lib/ruby/1.8/yaml.rb:133:in `load' >   from (irb):5 > irb(main):006:0> YAML.load("foo: bar\nbaz: bap\n") > => {"baz"=>"bap", "foo"=>"bar"} > > There are also examples which have been posted to this list showing > objects serialised to YAML and immediately back again, ending up with > different content. > > But I sympathise if you want to do something DRb-like, but between two > different Ruby implementations. XMLRPC/JSON won't give you full Ruby > object serialisation, and SOAP is too horrible to contemplate. > -- > Posted viahttp://www.ruby-forum.com/.