From 2b5a14bf7c96fcda9ff6cd9bbdd83d9294a0d354 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 7 May 2004 08:48:30 +0000 Subject: * eval.c (rb_eval): too many line trace call. (ruby-bugs PR#1320) * numeric.c (flo_to_s): tweak output string based to preserve decimal point and to remove trailing zeros. [ruby-talk:97891] * string.c (rb_str_index_m): use unsigned comparison for T_FIXNUM search. [ruby-talk:97342] * hash.c (rb_hash_equal): returns true if two hashes have same set of key-value set. [ruby-talk:97559] * hash.c (rb_hash_eql): returns true if two hashes are equal and have same default values. * string.c (rb_str_equal): always returns true or false, never returns nil. [ruby-dev:23404] * io.c (rb_io_reopen): should use rb_io_check_io(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rational.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rational.rb') 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 -- cgit v1.2.3