Skip to content

Commit

Permalink
Infinite recursion is kind of a drag...
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Aug 17, 2010
1 parent 5e82e89 commit c9eb002
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/NQP/NQPSetting.pm
Expand Up @@ -3,7 +3,7 @@ knowhow NQPInt is repr('P6int') {
nqp::instance_of(self.WHAT);
}
method Bool() {
self != 0
nqp::logical_not_int(nqp::equal_ints(self, 0, NQPInt), NQPInt)
}
method Int() {
self
Expand All @@ -21,7 +21,7 @@ knowhow NQPStr is repr('P6str') {
nqp::instance_of(self.WHAT);
}
method Bool() {
self ne ""
nqp::logical_not_int(nqp::equal_strs(self, "", NQPInt), NQPInt)
}
method Str() {
self
Expand All @@ -33,7 +33,7 @@ knowhow NQPNum is repr('P6num') {
nqp::instance_of(self.WHAT);
}
method Bool() {
self != 0.0
nqp::logical_not_int(nqp::equal_nums(self, 0.0, NQPInt), NQPInt)
}
method Int() {
nqp::coerce_num_to_int(self, NQPStr)
Expand Down

0 comments on commit c9eb002

Please sign in to comment.