The ability to pass indent parameter to to_nice_yaml was introduced in 2.2, but this is not noted in the docs.