Psych is the default yaml engine since ruby 1.9.3
Why, oh why does psych add a line break in its output? Check the example below.
ruby -v # => ruby 1.
yaml.to_yaml(options = {:line_width => -1})
is ok to solve the problem.
but RuboCop say
Useless assignment to variable - options.
so
yaml.to_yaml(line_width: -1)
is better.