Improve Ruby YAML hack search pattern