HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/rvm/src/ruby-2.6.8/spec/ruby/core/rational/comparison_spec.rb
require_relative '../../shared/rational/comparison'

describe "Rational#<=> when passed a Rational object" do
  it_behaves_like :rational_cmp_rat, :<=>
end

describe "Rational#<=> when passed a Integer object" do
  it_behaves_like :rational_cmp_int, :<=>
end

describe "Rational#<=> when passed a Float object" do
  it_behaves_like :rational_cmp_float, :<=>
end

describe "Rational#<=> when passed an Object that responds to #coerce" do
  it_behaves_like :rational_cmp_coerce, :<=>
  it_behaves_like :rational_cmp_coerce_exception, :<=>
end

describe "Rational#<=> when passed a non-Numeric Object that doesn't respond to #coerce" do
  it_behaves_like :rational_cmp_other, :<=>
end