Skip to content

Commit

Permalink
Fix double-stringification of Failure causing death bug; fix suggeste…
Browse files Browse the repository at this point in the history
…d by mls++.
  • Loading branch information
jnthn committed Dec 13, 2011
1 parent ad9e72c commit 32dc1ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/Failure.pm
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ my class Failure {
}
multi method Bool(Failure:D:) { $!handled = 1; Bool::False; }

method Int(Failure:D:) { $!handled ?? 0 !! $!exception.rethrow; }
method Num(Failure:D:) { $!handled ?? 0e0 !! $!exception.rethrow; }
multi method Str(Failure:D:) { $!handled ?? '' !! $!exception.rethrow; }
method Int(Failure:D:) { $!handled ?? 0 !! $!exception.throw; }
method Num(Failure:D:) { $!handled ?? 0e0 !! $!exception.throw; }
multi method Str(Failure:D:) { $!handled ?? '' !! $!exception.throw; }

Failure.^add_fallback(
-> $, $ { True },
Expand Down

0 comments on commit 32dc1ed

Please sign in to comment.