Skip to content

Commit

Permalink
cleaning up Critic gripes
Browse files Browse the repository at this point in the history
  • Loading branch information
petdance committed May 26, 2008
1 parent 92125da commit 8600ed7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Ack.pm
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,8 @@ sub def_types_from_ARGV {
unless exists $mappings{$type};
}

my @exts = map { s/^\.//; $_ } split ',', $ext; # %types stores extensions without leading '.'
my @exts = split /,/, $ext;
s/^\.// for @exts;

if ( !exists $mappings{$type} || ref($mappings{$type}) eq 'ARRAY' ) {
push @{$mappings{$type}}, @exts;
Expand Down
2 changes: 1 addition & 1 deletion Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Changelog for ack

1.84
1.84 Sun May 25 00:17:41 CDT 2008
[ENHANCEMENTS]
Support color on Windows. Thanks, Jan Dubois.

Expand Down
3 changes: 2 additions & 1 deletion ack-standalone
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,8 @@ sub def_types_from_ARGV {
unless exists $mappings{$type};
}

my @exts = map { s/^\.//; $_ } split ',', $ext; # %types stores extensions without leading '.'
my @exts = split /,/, $ext;
s/^\.// for @exts;

if ( !exists $mappings{$type} || ref($mappings{$type}) eq 'ARRAY' ) {
push @{$mappings{$type}}, @exts;
Expand Down
6 changes: 3 additions & 3 deletions t/module.t
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ HIDE_THE_WRAPPERS: {

}

my $iter1;
my $original_iterator;
{
@result = ();
@warns = ();
Expand All @@ -76,7 +76,7 @@ my $iter1;
my $what = App::Ack::get_starting_points( [$dir], \%opts );
lists_match( $what, ["t${dir_sep}text"], 'get_starting_points' );
my $iter = App::Ack::get_iterator( $what, \%opts );
$iter1 = $iter;
$original_iterator = $iter;
isa_ok( $iter, 'CODE' );
App::Ack::filetype_setup();
App::Ack::print_matches( $iter, \%opts );
Expand Down Expand Up @@ -113,7 +113,7 @@ my $iter1;
my $what = App::Ack::get_starting_points( [$dir, 't/etc'], \%opts );
lists_match( $what, ["t${dir_sep}text", "t${dir_sep}etc"], 'get_starting_points' );
my $iter = App::Ack::get_iterator( $what, \%opts );
isnt( $iter, $iter1, 'different iterators' );
isnt( $iter, $original_iterator, 'different iterators' );
isa_ok( $iter, 'CODE' );
App::Ack::filetype_setup();
App::Ack::print_matches( $iter, \%opts );
Expand Down

0 comments on commit 8600ed7

Please sign in to comment.