diff options
author | TP Honey <tphoney@users.noreply.github.com> | 2016-04-07 16:01:25 +0100 |
---|---|---|
committer | TP Honey <tphoney@users.noreply.github.com> | 2016-04-07 16:01:25 +0100 |
commit | 0624c3f8060deb6469046d13008a8fc605a72faa (patch) | |
tree | 0ded46e239e54520d889d51555ebb238c6dbfbfc /lib/puppet/parser | |
parent | c5486aba6284664ae87a65beaa011211c70ea03e (diff) | |
parent | 5639828bffd1beb0e44e59554e17c1a891924145 (diff) |
Merge pull request #589 from puppetlabs/modulesync-update
Multiple updates to stdlib and its testsuite
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r-- | lib/puppet/parser/functions/parseyaml.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/puppet/parser/functions/parseyaml.rb b/lib/puppet/parser/functions/parseyaml.rb index 9e84055..ba9d98a 100644 --- a/lib/puppet/parser/functions/parseyaml.rb +++ b/lib/puppet/parser/functions/parseyaml.rb @@ -16,7 +16,10 @@ be returned if the parsing of YAML string have failed. begin YAML::load(arguments[0]) || arguments[1] - rescue StandardError => e + # in ruby 1.9.3 Psych::SyntaxError is a RuntimeException + # this still needs to catch that and work also on rubies that + # do not have Psych available. + rescue StandardError, Psych::SyntaxError => e if arguments[1] arguments[1] else |