mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* rational.c (nurat_cmp): use rb_num_coerce_cmp.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b2fb759624
commit
f94228c8bd
3 changed files with 8 additions and 1 deletions
|
@ -692,6 +692,9 @@ class Rational_Test < Test::Unit::TestCase
|
|||
assert_equal(true, Rational(0) <= Rational(0))
|
||||
assert_equal(true, Rational(0) >= Rational(0))
|
||||
assert_equal(false, Rational(0) > Rational(0))
|
||||
|
||||
assert_equal(nil, Rational(0) <=> nil)
|
||||
assert_equal(nil, Rational(0) <=> 'foo')
|
||||
end
|
||||
|
||||
def test_equal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue