Re: patch for t/spec/s06-multi/type-based.t

2009-08-21 Thread Geoffrey Broadwell
On Fri, 2009-08-21 at 14:24 +1100, Илья wrote:
 -multi foo (@bar) { Array  ~ join(', ', @bar) }
 -multi foo (%bar)  { Hash  ~ join(', ', %bar.keys.sort) }
 +multi foo (@bar) { Positioanl  ~ join(', ', @bar) }
 +multi foo (%bar)  { Associative  ~ join(', ', %bar.keys.sort) }

Typo in third line there (Positioanl ).


-'f




patch for t/spec/s06-multi/type-based.t

2009-08-20 Thread Илья
Hi there,
trivial patch in attach.

(11:47:29 AM) ihrd: it type-based.t we have
(11:47:50 AM) ihrd: multi foo (@bar) { Array  ~ join(', ', @bar) }

(11:48:24 AM) ihrd: and is(foo(@array), 'Array foo, bar, baz',
'dispatched to the Array sub');

(11:48:47 AM) Jonathan Worthington: nod
(11:49:07 AM) ihrd: I am not quite sure, but it looks wrong for my now
...
(11:50:10 AM) Jonathan Worthington: Yeah, the comment is probably a bit off.
(11:50:12 AM) Jonathan Worthington: Yeah
(11:50:18 AM) Jonathan Worthington: Feel free to tweak it to say
Positional not Array.
(11:50:43 AM) Jonathan Worthington: Positional is more accurate there. :-)

Ihrd
Index: type-based.t
===
--- type-based.t	(revision 28042)
+++ type-based.t	(working copy)
@@ -13,8 +13,8 @@
 multi foo (Bool $bar)  { Bool  ~ $bar  }
 multi foo (Regex $bar) { Regex  ~ WHAT( $bar ) } # since Rule's don't stringify
 multi foo (Sub $bar)   { Sub  ~ $bar() }
-multi foo (@bar) { Array  ~ join(', ', @bar) }
-multi foo (%bar)  { Hash  ~ join(', ', %bar.keys.sort) }
+multi foo (@bar) { Positioanl  ~ join(', ', @bar) }
+multi foo (%bar)  { Associative  ~ join(', ', %bar.keys.sort) }
 multi foo (IO $fh) { IO }
 
 is(foo('test'), 'Str test', 'dispatched to the Str sub');
@@ -27,10 +27,10 @@
 is(foo(sub { 'baz' }), 'Sub baz', 'dispatched to the Sub sub');
 
 my @array = ('foo', 'bar', 'baz');
-is(foo(@array), 'Array foo, bar, baz', 'dispatched to the Array sub');
+is(foo(@array), 'Positional foo, bar, baz', 'dispatched to the Positional sub');
 
 my %hash = ('foo' = 1, 'bar' = 2, 'baz' = 3);
-is(foo(%hash), 'Hash bar, baz, foo', 'dispatched to the Hash sub');
+is(foo(%hash), 'Associative bar, baz, foo', 'dispatched to the Associative sub');
 
 is(foo($*ERR), 'IO', 'dispatched to the IO sub');