diff --git a/src/dynpmc/rational.pmc b/src/dynpmc/rational.pmc
index 7db3090..a051768 100644
a
|
b
|
|
397 | 397 | */ |
398 | 398 | VTABLE INTVAL get_bool() { |
399 | 399 | #ifdef PARROT_HAS_GMP |
400 | | if (mpq_cmp_si(RT(SELF), 0, 0)) |
| 400 | if (mpq_cmp_si(RT(SELF), 0, 1) == 0) |
401 | 401 | return 0; |
402 | 402 | else |
403 | 403 | return 1; |
diff --git a/t/dynpmc/rational.t b/t/dynpmc/rational.t
index 009120e..281ebce 100644
a
|
b
|
|
25 | 25 | $S0 = config_hash['gmp'] |
26 | 26 | |
27 | 27 | unless $S0 goto no_gmp |
28 | | plan(78) |
| 28 | plan(79) |
29 | 29 | loadlib $P1, 'rational' |
30 | 30 | test_init() |
31 | 31 | test_destroy() |
… |
… |
|
559 | 559 | |
560 | 560 | .sub test_init |
561 | 561 | new $P1, 'Rational' |
562 | | ok($P1,'initialization') |
| 562 | is($P1, 0, 'initialization') |
563 | 563 | .end |
564 | 564 | |
565 | 565 | .sub test_destroy |
… |
… |
|
669 | 669 | new $P0, 'Rational' |
670 | 670 | $P0 = "0" |
671 | 671 | $I0 = isfalse $P0 |
672 | | |
673 | | todo($I0, "0 value of rational does not evaluate correctly") |
| 672 | ok($I0, '0 should be false') |
| 673 | $P0 = "3/4" |
| 674 | $I0 = istrue $P0 |
| 675 | ok($I0, '3/4 should be true') |
674 | 676 | .end |
675 | 677 | |
676 | 678 | # Local Variables: |