On Jun 29, 2008, at 11:39 AM, Shashank Agarwal wrote:

> Try this
>
> x = {1=>2,"ABC" => {"a"=>"A","b"=>"B"}}.to_yaml
> x = x[5...x.length]

Which can be, simply:

{1=>2,"ABC" => {"a"=>"A","b"=>"B"}}.to_yaml[5..-1]

It may even be slightly more efficient to use String#sub

{1=>2,"ABC" => {"a"=>"A","b"=>"B"}}.to_yaml.sub("--- \n", '')