Skip to content

Commit

Permalink
update Changes and fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 6, 2017
1 parent 6624d1a commit a48bdd0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Changes
@@ -1,6 +1,8 @@

7.55 2017-11-06
- Added -role flag to Mojo::Base. (jberger)
- Improved tablify function in Mojo::Util to work with non-rectangular arrays.
(CandyAngel, jabberwok)
- Improved Windows compatibility of Mojo::Server::Daemon.

7.54 2017-11-05
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Util.pm
Expand Up @@ -290,8 +290,8 @@ sub tablify {
}
}

my @fs = (map({"\%-${_}s"} @spec[0 .. $#spec - 1]), '%s');
return join '', map { sprintf join(' ', @fs[0 .. $#$_]) . "\n", @$_ } @$rows;
my @fm = (map({"\%-${_}s"} @spec[0 .. $#spec - 1]), '%s');
return join '', map { sprintf join(' ', @fm[0 .. $#$_]) . "\n", @$_ } @$rows;
}

sub term_escape {
Expand Down
6 changes: 3 additions & 3 deletions t/mojo/util.t
Expand Up @@ -487,9 +487,9 @@ is tablify([[undef, 'yada'], ['yada', undef]]), " yada\nyada \n",
is tablify([['foo', 'bar', 'baz'], ['yada', 'yada', 'yada']]),
"foo bar baz\nyada yada yada\n", 'right result';
is tablify([['a', '', 0], [0, '', 'b']]), "a 0\n0 b\n", 'right result';
is tablify([[1, 2], [3 ] ]), "1 2\n3\n", 'right result';
is tablify([[1 ], [2, 3] ]), "1\n2 3\n", 'right result';
is tablify([[1 ], [ ], [2, 3]]), "1\n\n2 3\n", 'right result';
is tablify([[1, 2], [3]]), "1 2\n3\n", 'right result';
is tablify([[1], [2, 3]]), "1\n2 3\n", 'right result';
is tablify([[1], [], [2, 3]]), "1\n\n2 3\n", 'right result';

# deprecated
{
Expand Down

0 comments on commit a48bdd0

Please sign in to comment.