summaryrefslogtreecommitdiff
path: root/lib/rational.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-22 08:18:19 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-22 08:18:19 +0000
commitf550e69efc38c659575e0bca179475ddb714cddd (patch)
treeac0bd072f77833edcba8d46083d4139e513d7595 /lib/rational.rb
parent808e9289e6031eba0241e7be159669f8fd0073a3 (diff)
* parse.y (arg_ambiguous): hopefully better message.
* lib/cgi.rb (CGI::QueryExtension::initialize_query): to_ary git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rational.rb')
-rw-r--r--lib/rational.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/rational.rb b/lib/rational.rb
index e63e8c4..0c784fb 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