From: ptkwt@... (Phil Tomson) Date: 2003-10-03T09:48:29+09:00 Subject: Re: xml + ruby = happy programmer In article <20031002225021.59665.qmail@web10406.mail.yahoo.com>, paul vudmaska wrote: >--- James Britt wrote: >> paul vudmaska wrote: > >#(presuming %x creates an xml literal.) >x = %x{is your friend} > >#access it like this... >print x.m.l #>is your friend > Why the lucky stiff made a patch to do something like this with YAML using From his site (http://whytheluckystiff.net): "%y: %y{ ... } I've been having a lot of fun with this Ruby 1.8.0 hack. This patch adds the %y{ ... } construct to Ruby. This way, you can embed YAML directly in your Ruby script. basic_map = %y{ --- !omap - one: foo - two: bar - three: baz } Kinda cool, eh? Try: patch -p1 -d ~/src/ruby-1.8.0 < ruby-1.8.0-yamlstr.patch"