carlhuda/bundler — pull request #2170 by wallyqs (2012-11-19 20:53:06+00:00)
Title: Continue catching ArgumentError on YAML parsing errors in order to eval when using Syck as YAML::ENGINE.yamler

There is an issue in latest release from Bundler (1.2.2 as of now) that partially breaks support for loading gemspecs when using the Syck as the YAML engine.

Bundler supports loading gemspecs that could not be parsed by YAML by falling back to evaling the file, but somewhere between 1.2.1 and 1.2.2 this has stopped working and ArgumentError is raised instead, and Bundler setup fails.

This patch is a bit redundant, but the case that Psych::SyntaxError is defined and the YAML::ENGINE.yamler is set to 'syck' can still happen. I added a couple of tests that attempt to recreate this.

Thanks,

- Waldemar