aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_complexrational.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-29 16:06:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-29 16:06:54 +0000
commit716610ae565caed8df725dd26ffbc2000b673fcd (patch)
tree9af46bd4743c0429f963efa10889a1288775afff /test/ruby/test_complexrational.rb
parentdb31f2fafb3634364bba91130162bc9c394f8232 (diff)
downloadruby-716610ae565caed8df725dd26ffbc2000b673fcd.tar.gz
get rid of ambiguous parentheses warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_complexrational.rb')
-rw-r--r--test/ruby/test_complexrational.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/ruby/test_complexrational.rb b/test/ruby/test_complexrational.rb
index 1e7622a351..0360f5ee42 100644
--- a/test/ruby/test_complexrational.rb
+++ b/test/ruby/test_complexrational.rb
@@ -214,10 +214,10 @@ class SimpleRat < Numeric
def numerator() @num end
def denominator() @den end
- def +@ () self end
- def -@ () self.class.new(-@num, @den) end
+ def +@() self end
+ def -@() self.class.new(-@num, @den) end
- def + (o)
+ def +(o)
case o
when SimpleRat, Rational
a = @num * o.denominator
@@ -233,7 +233,7 @@ class SimpleRat < Numeric
end
end
- def - (o)
+ def -(o)
case o
when SimpleRat, Rational
a = @num * o.denominator
@@ -249,7 +249,7 @@ class SimpleRat < Numeric
end
end
- def * (o)
+ def *(o)
case o
when SimpleRat, Rational
a = @num * o.numerator
@@ -334,7 +334,7 @@ class SimpleRat < Numeric
def divmod(o) [div(o), modulo(o)] end
def quotrem(o) [quot(o), remainder(o)] end
- def ** (o)
+ def **(o)
case o
when SimpleRat, Rational
Float(self) ** o
@@ -357,7 +357,7 @@ class SimpleRat < Numeric
end
end
- def <=> (o)
+ def <=>(o)
case o
when SimpleRat, Rational
a = @num * o.denominator
@@ -373,7 +373,7 @@ class SimpleRat < Numeric
end
end
- def == (o)
+ def ==(o)
begin
(self <=> o) == 0
rescue