From: noreply@... Date: 2007-05-14T04:00:57+09:00 Subject: [ ruby-Bugs-10739 ] Rational comparison to 0 fails when denominator is != 1 Bugs item #10739, was opened at 2007-05-10 08:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1698&aid=10739&group_id=426 Category: Core Group: 1.8.5 Status: Closed Resolution: None Priority: 3 Submitted By: Bertram Scharpf (bscharpf) Assigned to: Nobody (None) Summary: Rational comparison to 0 fails when denominator is != 1 Initial Comment: irb(main):001:0> r = Rational.new! 0, 100 => Rational(0, 100) irb(main):002:0> r.zero? => false irb(main):003:0> r == 0 => false ---------------------------------------------------------------------- Comment By: mathew ! (meta) Date: 2007-05-13 14:00 Message: In that case, it's a documentation bug. The documentation says that Rational() is preferred, but doesn't say that new! should not be used. ---------------------------------------------------------------------- Comment By: Nobuyoshi Nakada (nobu) Date: 2007-05-12 09:20 Message: Not a bug. ---------------------------------------------------------------------- Comment By: Nobuyoshi Nakada (nobu) Date: 2007-05-12 09:20 Message: Do not use Rational.new! directly. ---------------------------------------------------------------------- Comment By: Nobuyoshi Nakada (nobu) Date: 2007-05-11 01:34 Message: Not a bug. ---------------------------------------------------------------------- Comment By: Nobuyoshi Nakada (nobu) Date: 2007-05-11 01:34 Message: Do not use Rational.new! directly. ---------------------------------------------------------------------- Comment By: Nobuyoshi Nakada (nobu) Date: 2007-05-10 08:38 Message: Not a bug. ---------------------------------------------------------------------- Comment By: Nobuyoshi Nakada (nobu) Date: 2007-05-10 08:38 Message: Do not use Rational.new! directly. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1698&aid=10739&group_id=426