diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-29 16:06:54 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-29 16:06:54 +0000 |
commit | 6783f4c1b1d3536ca92421f0526c510cc3e1ab51 (patch) | |
tree | 9af46bd4743c0429f963efa10889a1288775afff /test/ruby/test_complexrational.rb | |
parent | 3d804373238fb02c002c6dbe99e4e6447ddf0ab6 (diff) | |
download | ruby-6783f4c1b1d3536ca92421f0526c510cc3e1ab51.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.rb | 16 |
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 |