On Sat, Feb 12, 2011 at 08:36, Brice Figureau
<[email protected]> wrote:
> The following manifest was producing a parse error:
> $int = { 'eth0' => 'bla' }
> $foo = $int['eth0'] ? {
> 'bla' => 'foo',
> default => 'bleh'
> }
>
> because selectors didn't support hash access.
After merging the proposed change in, I get a test failure on my machine:
1) Puppet::Parser when parsing selector should support hash access
on the left hand side
Failure/Error: lambda { @parser.parse("$h = { 'a' => 'b' }\n$a =
$h['a'] ? { 'b' => 'd', default => undef }") }.should_not raise_error
expected no Exception, got #<Puppet::ParseError: Syntax error
at '?' at line 2>
# ./spec/unit/parser/parser_spec.rb:81
⚡ git log --oneline -1
683bd17 Merge branch 'masterzen/tickets/2.6.x/5516' into
bug/2.6.next/5516-hashes-can't-be-used-in-selectors
It isn't entirely clear to me why this fails, and I don't have time to
investigate further this second, but a simple merge to 2.6.next
doesn't fix the problem on my machine.
Regards,
Daniel
--
⎋ Puppet Labs Developer – http://puppetlabs.com
✉ Daniel Pittman <[email protected]>
✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775
♲ Made with 100 percent post-consumer electrons
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.