Permalink
Browse files

Fixed typos and formatting

  • Loading branch information...
1 parent 9b666f0 commit 0417c5bfbc8b538b43313200fb3b309a74b8d7da @thundergnat committed Nov 16, 2010
Showing with 7 additions and 7 deletions.
  1. +5 −5 lib/Sort/Naturally.pm6
  2. +2 −2 t/01-basic.t
@@ -17,9 +17,9 @@ sub naturally ($a) is export(:standard) {
sub p5naturally ($a) is export(:p5) {
$a.lc.subst(/^(\d+)/, -> $/ { 0 ~ $0.chars.chr ~ $0 } )\
- # Less than awesome use of captures, but rakudo doesn't have <?after ...>
- # lookaround implemented yet. Really should be:
- # .subst(/<?after \D>(\d+)/, -> $/ { 'z{' ~ $0.chars.chr ~ $0 }, :g)
- .subst(/(\D)(\d+)/, -> $/ { $0 ~ 'z{' ~ $1.chars.chr ~ $1 }, :g)
- ~ "\x0" ~ $a
+ # Less than awesome use of captures, but rakudo doesn't have <?after ...>
+ # lookaround implemented yet. Really should be:
+ # .subst(/<?after \D>(\d+)/, -> $/ { 'z{' ~ $0.chars.chr ~ $0 }, :g)
+ .subst(/(\D)(\d+)/, -> $/ { $0 ~ 'z{' ~ $1.chars.chr ~ $1 }, :g)
+ ~ "\x0" ~ $a
}
View
@@ -8,7 +8,7 @@ plan 12;
my @test;
my $nsorted = '';
-# does it deal with empty array in a sane fashhion?
+# does it deal with empty array in a sane fashion?
is(~@test.sort( { .&naturally } ), $nsorted,
"calling &naturally in a sort block on an empty array is ok");
is(~@test.nsort, $nsorted,
@@ -19,7 +19,7 @@ is(~@test.sort( { $^a ncmp $^b } ), $nsorted,
"calling ncmp in a sort block on an empty array is ok");
-# does it return the terms in the expected oorder?
+# does it return the terms in the expected order?
@test = <2 210 21 30 3rd d1 d10 D2 D21 d3 aid Are any ANY 1 Any 11 100 14th>;
$nsorted = '1 2 3rd 11 14th 21 30 100 210 aid ANY Any any Are d1 D2 d3 d10 D21';

0 comments on commit 0417c5b

Please sign in to comment.