Import r41148 from ruby trunk

This fixes deprecation warnings when creating YAML gemspecs.
Fix backwards compatibility for @387ab4e
Fix location of r41148 in History