From: Ryan Davis Date: 2009-04-08T07:27:09+09:00 Subject: Re: Emit YAML without leading hyphens? On Apr 7, 2009, at 14:14 , bwv549 wrote: > How to emit yaml without the leading hyphens? > > [1,2,3].to_yaml > # ==>"--- \n- 1\n- 2\n- 3\n" > > I realize that I can do the following to get the result I'm after, but > it seems sort of "after the fact" > [1,2,3].to_yaml[5..-1] > # ==>"- 1\n- 2\n- 3\n" > > I know 'to_yaml' takes options, but I can't find acceptable options > anywhere. > [1,2,3].to_yaml({:??? => true}) As I understand it, if you remove the hyphens, it is no longer yaml, so don't do that.