diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-11 07:02:23 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-11 07:02:23 +0000 |
commit | 90b8654fcd3acfaab6339f3d039e12410595e3c8 (patch) | |
tree | dd8a8256032a8c6ef07ac3ae8c6464c11282f104 /lib/rational.rb | |
parent | e0e6213157a34e1cbbd134196990b288fa0a6fff (diff) | |
download | ruby-90b8654fcd3acfaab6339f3d039e12410595e3c8.tar.gz ruby-90b8654fcd3acfaab6339f3d039e12410595e3c8.tar.xz ruby-90b8654fcd3acfaab6339f3d039e12410595e3c8.zip |
* eval.c (rb_eval): ruby_frame->last_func may be null, if it's
called outside of a method.
* parse.y (arg): use INT2NUM, not INT2FIX for tUMINUS.
* parse.y (arg): unnecessary negative tPOW treatment.
* parse.y (tokadd_escape): wrong backslash escapement.
* parse.y (stmt,arg): too much void value check.
* parse.y (stmt,arg): need to check void value on rules which does
not use node_assign().
* ext/socket/socket.c (ipaddr): need not to taint hostnames.
* range.c (range_include): should be based on "<=>", whereas
member? still is based on "each".
* range.c (range_min,range_max): redefine methods based on "<=>".
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rational.rb')
-rw-r--r-- | lib/rational.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rational.rb b/lib/rational.rb index decf26b1b..ff35f36a3 100644 --- a/lib/rational.rb +++ b/lib/rational.rb @@ -8,7 +8,7 @@ # -- # Usage: # class Rational < Numeric -# (include Compareable) +# (include Comparable) # # Rational(a, b) --> a/b # @@ -47,7 +47,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, "denometor is 0" if den == 0 + raise ZeroDivisionError, "denominator is 0" if den == 0 if den < 0 num = -num @@ -132,7 +132,7 @@ class Rational < Numeric den = @denominator * a.numerator Rational(num, den) elsif a.kind_of?(Integer) - raise ZeroDivisionError, "devided by 0" if a == 0 + raise ZeroDivisionError, "divided by 0" if a == 0 self / Rational.new!(a, 1) elsif a.kind_of?(Float) Float(self) / a |