# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #117935]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=117935 >


<lizmat> rn: my %h= (:a<1>); say %h.postcircumfix:<{ }>("a", p => 0 )
<camelia> rakudo fe7049: OUTPUT«"a" => "1"␤»
<camelia> ..niecza v24-45-gbf8d2ad: OUTPUT«"a" => 1␤»
* lizmat thinks that is a bug, it should just be "1", not a pair
<masak> lizmat++ # finding all these nice corner cases
<masak> lizmat: want me to submit the p => 0 one?
<lizmat> masak: please
* masak submits lizmat's rakudobug

Usually, just accessing a hash yields "1" in the above case. The :p
parameter says "give me the pair", and so passing in :p (as a named
parameter or an adverb, same thing) should indeed give "'a' => '1'".
But here lizmat is passing the named parameter with the value 0 (one
of the falsy values in Perl 6), which should again turn it off. (Use
case: passing in a variable which may be truthy or falsy.)

Reply via email to