From: Brian Candler Date: 2009-03-03T06:34:12+09:00 Subject: Re: Using YAML for inter-process communication - anything built-in ? Thibaut Barr竪re wrote: > If something already exists in Ruby to do that this way, I'd like to > know about it. I came across a YAML-RPC once upon a time; you could try looking for it. I'd avoid YAML as much as possible, as it's horribly broken; certainly useless for mere humans writing YAML anyway. 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 via http://www.ruby-forum.com/.