diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-04-22 08:18:19 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-04-22 08:18:19 +0000 |
| commit | 936bc711cec28cc336fccede492d7ede26aa4c71 (patch) | |
| tree | ac0bd072f77833edcba8d46083d4139e513d7595 /lib/rational.rb | |
| parent | f9dda551f865a39d0fba16dbd99fdeee73fe915c (diff) | |
| download | ruby-936bc711cec28cc336fccede492d7ede26aa4c71.tar.gz ruby-936bc711cec28cc336fccede492d7ede26aa4c71.tar.xz ruby-936bc711cec28cc336fccede492d7ede26aa4c71.zip | |
* parse.y (arg_ambiguous): hopefully better message.
* lib/cgi.rb (CGI::QueryExtension::initialize_query): to_ary
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rational.rb')
| -rw-r--r-- | lib/rational.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/rational.rb b/lib/rational.rb index e63e8c481..0c784fb94 100644 --- a/lib/rational.rb +++ b/lib/rational.rb @@ -67,7 +67,9 @@ class Rational < Numeric def Rational.new!(num, den = 1) new(num, den) end - + + private_class_method :new + def initialize(num, den) if den < 0 num = -num |
