mirror of
https://github.com/ruby/ruby.git
synced 2025-09-18 10:03:59 +02:00
* complex.c: undef-ed shome methods. [ruby-core:24110]
* complex.c (Numeric#arg): NaN for NaN. [ruby-core:24116] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6120338287
commit
b61ab11f49
3 changed files with 36 additions and 5 deletions
|
@ -519,7 +519,7 @@ class Complex_Test < Test::Unit::TestCase
|
|||
assert_instance_of(Fixnum, Complex(1,2) - Complex(1,2))
|
||||
assert_instance_of(Fixnum, Complex(1,2) * 0)
|
||||
assert_instance_of(Fixnum, Complex(1,2) / Complex(1,2))
|
||||
assert_instance_of(Fixnum, Complex(1,2).div(Complex(1,2)))
|
||||
# assert_instance_of(Fixnum, Complex(1,2).div(Complex(1,2)))
|
||||
assert_instance_of(Fixnum, Complex(1,2).quo(Complex(1,2)))
|
||||
# assert_instance_of(Fixnum, Complex(1,2) ** 0) # mathn's bug
|
||||
end
|
||||
|
@ -779,17 +779,19 @@ class Complex_Test < Test::Unit::TestCase
|
|||
|
||||
def test_respond
|
||||
c = Complex(1,1)
|
||||
assert_equal(false, c.respond_to?(:%))
|
||||
assert_equal(false, c.respond_to?(:<))
|
||||
assert_equal(false, c.respond_to?(:<=))
|
||||
assert_equal(false, c.respond_to?(:<=>))
|
||||
assert_equal(false, c.respond_to?(:>))
|
||||
assert_equal(false, c.respond_to?(:>=))
|
||||
assert_equal(false, c.respond_to?(:between?))
|
||||
# assert_equal(false, c.respond_to?(:div)) # ?
|
||||
assert_equal(false, c.respond_to?(:div))
|
||||
assert_equal(false, c.respond_to?(:divmod))
|
||||
assert_equal(false, c.respond_to?(:floor))
|
||||
assert_equal(false, c.respond_to?(:ceil))
|
||||
assert_equal(false, c.respond_to?(:modulo))
|
||||
assert_equal(false, c.respond_to?(:remainder))
|
||||
assert_equal(false, c.respond_to?(:round))
|
||||
assert_equal(false, c.respond_to?(:step))
|
||||
assert_equal(false, c.respond_to?(:tunrcate))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue