On Sat Aug 14 06:04:40 2010, masak wrote:
> <isBEKaml> rakudo: my $a = "buuss"; my $b = do given $a { when "a" {
> 42 ?? "foo" !! "bar" } }; say $b
> <p6eval> rakudo 083999: OUTPUT«0»
> <isBEKaml> :)
> <isBEKaml> there.
> <masak> isBEKaml++
> * masak submits rakudobug
> <masak> rakudo: say do given 'x' { when 'y' {} }
> <p6eval> rakudo 083999: OUTPUT«0»
> <masak> I think it should be Nil or something.
> <masak> or maybe something undefined :P
> <isBEKaml> I'd hazard a guess at Any()
> <isBEKaml> but that doesn't make sense since this is more of a
> programmer error.
> <masak> isBEKaml: in this case, yes. in the general case, not necessarily.<pmichaud> the 0 is the result of the failed test <pmichaud> (against the "a") <masak> pmichaud: oh! <masak> so there is some logic to it anyway. <pmichaud> yes, I don't know what spec would say here. But there was a smartmatch performed, and Rakudo is using that as the return value since it's the last operation performed <pmichaud> (in the block) <masak> pmichaud: the simplest thing would be to leave it like it is, returning False. <pmichaud> masak: I agree; and I like 'simplest' here :) <masak> aye. * masak closes ticket
