Issue #19313 has been reported by James Shubin.
----------------------------------------
Bug #19313: Regression: Syntax parser is broken with hashes
https://projects.puppetlabs.com/issues/19313
Author: James Shubin
Status: Unreviewed
Priority: Urgent
Assignee:
Category:
Target version:
Affected Puppet version: 3.1.0
Keywords: Regression
Branch:
Hi,
Hopefully my example is clear enough to describe the problem. Maybe you could
add this to a test suite too?
HTH,
James
$ ls
broken.pp works1.pp works2.pp
$ puppet apply works1.pp
/usr/share/rubygems/rubygems/custom_require.rb:36:in `require': iconv will be
deprecated in the future, use String#encode instead.
notice: Finished catalog run in 1.68 seconds
$ puppet apply works2.pp
/usr/share/rubygems/rubygems/custom_require.rb:36:in `require': iconv will be
deprecated in the future, use String#encode instead.
notice: Finished catalog run in 1.68 seconds
$ puppet apply broken.pp
/usr/share/rubygems/rubygems/custom_require.rb:36:in `require': iconv will be
deprecated in the future, use String#encode instead.
Could not parse for environment production: Syntax error at '{'; expected '}'
at /tmp/bug/broken.pp:5 on node freed.purpleidea.com
$ puppet --version
3.1.0 (same for 2.7.18)
<different machine>
$ puppet apply broken.pp
punotice: Finished catalog run in 0.04 seconds
$ puppet --version
2.6.17
# cat works1.pp
$foo = ''
$bar = $foo ? {
'' => "hey" ? {
default => [],
},
default => 'wtf',
}
# cat works2.pp
$foo = ''
$wtf = {}
$bar = $foo ? {
'' => "hey" ? {
default => $wtf,
},
default => 'wtf',
}
# cat broken.pp
$foo = ''
$bar = $foo ? {
'' => "hey" ? {
default => {},
},
default => 'wtf',
}
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.