Skip to content

Commit

Permalink
Cast Match objects to Int objects before calling Date.new
Browse files Browse the repository at this point in the history
Fixes RT#127016: https://rt.perl.org/Public/Bug/Display.html?id=127016

This fix does what the type coercion (i.e., Int()) did explicitly.
  • Loading branch information
titsuki committed Jan 4, 2018
1 parent 1d034df commit f9f8e44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Date.pm
Expand Up @@ -47,7 +47,7 @@ my class Date does Dateish {
'-'
(\d\d) # day
$/;
self.new($0,$1,$2,:&formatter,|%_)
self.new(+$0,+$1,+$2,:&formatter,|%_)
}
multi method new(Date: Dateish $d, :&formatter, *%_) {
self === Date
Expand Down

0 comments on commit f9f8e44

Please sign in to comment.