(#19886) Fix test with yaml issue not being triggered for ruby 1.8.7

The YAML parser in Ruby 1.8.7 is very permissive. The bad YAML used
to test that raised errors from the YAML parser gets processed did not
get an exception as expected. This commit replaces the problem with one
that triggers YAML parser in 1.8.7, and later rubies.