[perl #60404] Array becomes string in subroutine or method calls

2009-01-11 Thread Patrick R. Michaud via RT
On Sat Nov 08 00:54:52 2008, ihrd wrote: > > sub foo (@a) { 1.say for @a } > foo((1,2,3,4)); # only one 1 > foo([1,2,3,4]); # only one 1 > foo( my @a = 1,2,3 ); # only one 1 Now fixed as of r35392: $ ./parrot perl6.pbc > sub foo(@a) { 1.say for @a } > foo((1,2,3,4)); 1 1 1

[perl #60404] Array becomes string in subroutine or method calls

2008-11-26 Thread Patrick R. Michaud via RT
Unfortunately I think this patch causes the following to fail: sub foo($a) { 1.say for $a } foo((1,2,3)); The problem is that simply looking at (misnamed) Perl6Scalar and deciding what to do is a little coarse-grained. The real problem is in the argument binding to a scalar versus array

[perl #60404] Array becomes string in subroutine or method calls

2008-11-26 Thread jn...@jnthn.net via RT
On Sat Nov 08 09:32:09 2008, pmichaud wrote: > On Sat, Nov 08, 2008 at 12:54:52AM -0800, Ilya Belikin wrote: > > sub foo (@a) { 1.say for @a } > > foo((1,2,3,4)); # only one 1 > > foo([1,2,3,4]); # only one 1 > > foo( my @a = 1,2,3 ); # only one 1 > > > > This one really pesky bug :( >

Re: [perl #60404] Array becomes string in subroutine or method calls

2008-11-26 Thread Илья
Thank you, very much! 2008/11/26 Moritz Lenz via RT <[EMAIL PROTECTED]>: > On Sat Nov 08 09:32:09 2008, pmichaud wrote: >> On Sat, Nov 08, 2008 at 12:54:52AM -0800, Ilya Belikin wrote: >> > Hi there, >> > >> > sub foo (@a) { 1.say for @a } >> > foo((1,2,3,4)); # only one 1 >> > foo([1,2,3,4]

Re: [perl #60404] Array becomes string in subroutine or method calls

2008-11-08 Thread Patrick R. Michaud
On Sat, Nov 08, 2008 at 12:54:52AM -0800, Ilya Belikin wrote: > Hi there, > > sub foo (@a) { 1.say for @a } > foo((1,2,3,4)); # only one 1 > foo([1,2,3,4]); # only one 1 > foo( my @a = 1,2,3 ); # only one 1 > > This one really pesky bug :( I suspect this appeared as a result of the r

[perl #60404] Array becomes string in subroutine or method calls

2008-11-08 Thread via RT
# New Ticket Created by Ilya Belikin # Please include the string: [perl #60404] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=60404 > Hi there, sub foo (@a) { 1.say for @a } foo((1,2,3,4)); # only one 1 foo([1,2,3,4