Skip to content

Commit

Permalink
Merge pull request #478 from lucasbuchala/tempo
Browse files Browse the repository at this point in the history
disallow .later() without any named arguments
  • Loading branch information
FROGGS committed Jul 24, 2015
2 parents cf09f8b + cb4b31d commit 3458e97
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/Temporal.pm
Expand Up @@ -577,6 +577,9 @@ my class Date does Dateish {
die "More than one time unit supplied"
if %unit.keys > 1;

die "No time unit supplied"
unless %unit.keys;

my ($unit, $amount) = %unit.kv;
self!VALID-UNIT($unit);

Expand Down

0 comments on commit 3458e97

Please sign in to comment.