[perl #61172] hash becomes string or int

2009-01-11 Thread Patrick R. Michaud via RT
Now fixed in r35397: $ ./parrot perl6.pbc > sub foo(%h?) { { a => 1, %h }.perl.say; }; > foo( { b => 2 } ); {"a" => 1, "b" => 2} > foo( { } ); {"a" => 1} > foo( ); {"a" => 1} > We need tests for optional array and hash parameters in the test suite, so assigning ticket to moritz.

[perl #61172] hash becomes string or int

2008-12-30 Thread Patrick R. Michaud via RT
On Mon Dec 08 10:24:33 2008, ihrd wrote: > Hi! > in 33622: > > > sub foo (%h) { say %h.perl }; foo({a=>1}); > {"a" => 1} > > sub foo (%h) { say %h.perl }; foo(1); > 1 > > sub foo (%h) { say %h.perl }; foo("a"); > "a" This is a problem with parameter passing of arrays and hashes in general -- the

[perl #61172] hash becomes string or int

2008-12-09 Thread via RT
# New Ticket Created by Ilya Belikin # Please include the string: [perl #61172] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=61172 > Hi! in 33622: > sub foo (%h) { say %h.perl }; foo({a=>1}); {"a" => 1} > sub foo (%h) {