Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
avoid assigning defaults of wrong type
  • Loading branch information
moritz committed Oct 2, 2011
1 parent 80ee09e commit a78398a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/Str.pm
Expand Up @@ -452,7 +452,7 @@ my class Str does Stringy {
self.trim-leading.trim-trailing;
}

method words(Str:D: Int $limit = *) {
method words(Str:D: $limit = *) {
self.comb( / \S+ /, $limit );
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/Temporal.pm
Expand Up @@ -101,7 +101,7 @@ my role Dateish {
1 .. self.days-in-month);
}

method truncate-parts($unit, %parts is copy = ()) {
method truncate-parts($unit, %parts is copy) {
# Helper for DateTime.truncated-to and Date.truncated-to.
if $unit eq 'week' {
my $dc = self.get-daycount;
Expand Down

0 comments on commit a78398a

Please sign in to comment.