Skip to content

Commit

Permalink
名前変えた
Browse files Browse the repository at this point in the history
  • Loading branch information
hisaichi5518 committed Sep 16, 2012
1 parent f38b781 commit 060e4ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/Malts/Util.pm
Expand Up @@ -24,7 +24,7 @@ sub is_binary {
$type !~ /\b(?:text|xml|javascript|json)\b/;
}

sub remove_error_line {
sub remove_fileline {
my ($message) = @_;

$message =~ s/(?:.+ called)? at .+? line \d+\.?\n?//g;
Expand Down Expand Up @@ -58,7 +58,7 @@ Create a encoding object using Encode::find_encoding($encoding).
Returns true if I<$file_name> is binary.
=head2 C<< remove_error_line($error_message) >>
=head2 C<< remove_fileline($error_message) >>
Remove error line.
Expand Down
8 changes: 4 additions & 4 deletions t/01_core/01_util.t
Expand Up @@ -17,16 +17,16 @@ subtest 'is_binary' => sub {
ok !+Malts::Util::is_binary('.txt');
};

subtest 'remove_error_line' => sub {
subtest 'remove_fileline' => sub {
my $message;

$message = Malts::Util::remove_error_line('Died at -e line 1.');
$message = Malts::Util::remove_fileline('Died at -e line 1.');
is $message, 'Died';

$message = Malts::Util::remove_error_line("Died at -e line 1.\n");
$message = Malts::Util::remove_fileline("Died at -e line 1.\n");
is $message, 'Died';

$message = Malts::Util::remove_error_line(<<'...');
$message = Malts::Util::remove_fileline(<<'...');
Died at lib/Malts.pm line 1.
Malts::Test::apptest('Malts::Web::Response(0x7f9b32b74330)', '200', 'HASH(0x7f9b32b74330)') called at lib/Malts/App.pm line 334
...
Expand Down

0 comments on commit 060e4ed

Please sign in to comment.