summaryrefslogtreecommitdiff
path: root/lib/puppet
diff options
context:
space:
mode:
authorTP Honey <tphoney@users.noreply.github.com>2016-04-07 16:01:25 +0100
committerTP Honey <tphoney@users.noreply.github.com>2016-04-07 16:01:25 +0100
commit0624c3f8060deb6469046d13008a8fc605a72faa (patch)
tree0ded46e239e54520d889d51555ebb238c6dbfbfc /lib/puppet
parentc5486aba6284664ae87a65beaa011211c70ea03e (diff)
parent5639828bffd1beb0e44e59554e17c1a891924145 (diff)
Merge pull request #589 from puppetlabs/modulesync-update
Multiple updates to stdlib and its testsuite
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/parser/functions/parseyaml.rb5
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