From d53e02edb532f3d1ea7e8a9f29faec33b888fe70 Mon Sep 17 00:00:00 2001 From: Solomon Foster Date: Sun, 7 Feb 2010 10:11:56 -0500 Subject: [PATCH] Implement Str.Int and tweak Str.Bool declaration. --- src/core/Str.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/Str.pm b/src/core/Str.pm index fbb62e74d31..fbb4393ecf2 100644 --- a/src/core/Str.pm +++ b/src/core/Str.pm @@ -1,3 +1,7 @@ augment class Str { - method Bool { ?(pir::istrue__IP(self)); } -} \ No newline at end of file + multi method Bool { ?(pir::istrue__IP(self)); } + + # CHEAT: this implementation is a bit of a cheat, + # but works fine for now. + multi method Int { (+self).Int; } +}