From: Florian Gross Date: 2004-10-27T04:29:04+09:00 Subject: Re: Inline YAML in Ruby code - possible? converse? gabriele renzi wrote: > Its Me ha scritto: > >> I recall an old post by Why which described some way to inline chunks of >> YAML right into Ruby code. Could not locate it in Google. Roughly like >> >> def foo >> a = %y >> r: abc >> s: pqr >> t: - 1 >> - 2 >> - 3 >> %y >> return a >> end >> >> Does anyone have the details, and what to include to enable this >> processing? > > you have to patch ruby and recompile You can also use the source code filter technique described in [ruby-talk:116822], but you would need to implement the syntax for yourself. The benefit of this is that it will not need a recompile of Ruby.