Skip to content

Commit

Permalink
Fixing get_type()
Browse files Browse the repository at this point in the history
  • Loading branch information
bessarabov committed Sep 25, 2023
1 parent 12aefd4 commit 439abe1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/get_type.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ my %tests = (
'1.0',
'0.0',
'-1.0',
'1.123',
],
);

Expand Down
2 changes: 1 addition & 1 deletion tsv2table
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ sub get_type {

if ($value =~ /^-?\d+\z/a) {
return 'int';
} elsif ($value =~ /^-?\d+\.\d\z/a) {
} elsif ($value =~ /^-?\d+\.\d+\z/a) {
return 'float';
} else {
return 'string';
Expand Down

0 comments on commit 439abe1

Please sign in to comment.