Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make Version.new("") not die
  • Loading branch information
lizmat committed Nov 3, 2014
1 parent 30d6caf commit 8a4b9e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/Version.pm
Expand Up @@ -8,7 +8,10 @@ class Version {
$_ .= Numeric if .Numeric.defined ;
$_ = * if $_ eq '*';
}
self.bless(:parts(@parts), :plus($s.substr(*-1) eq '+'));
self.bless(
:parts(@parts),
$s.chars ?? :plus($s.substr(*-1) eq '+') !! (),
);
};

multi method Str(Version:D:) {
Expand Down

0 comments on commit 8a4b9e8

Please sign in to comment.