On 12/02/11 21:44, Daniel Pittman wrote:
> 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.

Did you merge from the patch I sent here or from my github branch?

I removed the auto-generated parser.rb from the patch I sent to the list
so that it can be read more easily. You need to rebuild the parser.rb
file from the grammar:
touch lib/puppet/parser/grammar.ra
make -C lib/puppet/parser

Then try again the patch.

Or merge with the tickets/2.6.x/5516 branch in my github repository.
-- 
Brice Figureau
My Blog: http://www.masterzen.fr/

-- 
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.

Reply via email to