diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-29 07:54:38 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-29 07:54:38 +0000 |
commit | 919f456de88e9e1011db8f6e4e484e1b25e77af4 (patch) | |
tree | e367d6d1ba65d30139ae43891b52edfe71be8fca /lib/rational.rb | |
parent | 6a738f22656ffe247bcd02cf354c12a5370818ec (diff) |
* exception message clean-up by Ian Macdonald <[email protected]>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rational.rb')
-rw-r--r-- | lib/rational.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rational.rb b/lib/rational.rb index 38af7b8a81..2019363ac6 100644 --- a/lib/rational.rb +++ b/lib/rational.rb @@ -48,7 +48,7 @@ class Rational < Numeric @RCS_ID='-$Id: rational.rb,v 1.7 1999/08/24 12:49:28 keiju Exp keiju $-' def Rational.reduce(num, den = 1) - raise ZeroDivisionError, "denominator is 0" if den == 0 + raise ZeroDivisionError, "denominator is zero" if den == 0 if den < 0 num = -num @@ -135,7 +135,7 @@ class Rational < Numeric den = @denominator * a.numerator Rational(num, den) elsif a.kind_of?(Integer) - raise ZeroDivisionError, "divided by 0" if a == 0 + raise ZeroDivisionError, "division by zero" if a == 0 self / Rational.new!(a, 1) elsif a.kind_of?(Float) Float(self) / a |