X-Git-Url: http://git.shiar.net/perl/list-index.git/blobdiff_plain/d61e8685992586de85f6b7b58fee20f15c8111b0..e269a677a2adb49fc79e6c2267551a716a55c559:/lib/List/Index.pm diff --git a/lib/List/Index.pm b/lib/List/Index.pm index 6a818bb..89fdc75 100644 --- a/lib/List/Index.pm +++ b/lib/List/Index.pm @@ -65,8 +65,8 @@ sub rangematch { $c1 = substr $s1, $i, 1; my $c2 = length $s2 <= $i ? undef : substr $s2, $i, 1; my $next = $i + 1 >= length($s1) ? $c1 : chr( ord($c1) + 1 ); - $next le $c2 or next if defined $c2; my $last = defined $c2 && $i == 0 ? chr( ord($c2) - (length $s2 > 1) ) : 'z'; + $next le $last or next if defined $c2; push @allow, $prefix."[$next-$last]"; } continue {