From: Anshul Khandelwal Date: 2010-02-24T04:09:26+09:00 Subject: [ruby-core:28318] [Bug #2784] The formatting options hash passed to the to_yaml methods do nothing. Bug #2784: The formatting options hash passed to the to_yaml methods do nothing. http://redmine.ruby-lang.org/issues/show/2784 Author: Anshul Khandelwal Status: Open, Priority: High Category: lib ruby -v: 1.8.7, 1.9.1 At the moment, there appears to be no documented way to format the output of the various to_yaml methods. They all accept an options hash but the documentation does not specify what options may be passed. Also, the use of to_yaml_style is undocumented. class Array def to_yaml_style :inline end end results in inline formatting of the resulting yaml. This is not documented anywhere but works. This is further described in [1] and [2]. [1] http://stackoverflow.com/questions/1054730/is-it-possible-to-specify-formatting-options-for-toyaml-in-ruby [2] http://stackoverflow.com/questions/2156762/how-to-get-the-formatting-options-for-the-to-yaml-method-working-on-ruby-1-9-1 ---------------------------------------- http://redmine.ruby-lang.org