Sha256: 84709898c842fd00c76c90710e34cc3bc92adc044cfe26b7eedd8e2eb1b83e29

Contents?: true

Size: 413 Bytes

Versions: 52

Compression:

Stored size: 413 Bytes

Contents

ruby_version_is "1.9" do

  describe "Complex#rationalize" do

    it "raises RangeError if self has non-zero imaginary part" do
      lambda { Complex(1,5).rationalize }.should raise_error(RangeError)
    end

    it "returns a Rational if self has zero imaginary part" do
      Complex(1,0).rationalize.should == Rational(1,1)
      Complex(2<<63+5).rationalize.should == Rational(2<<63+5,1)
    end

  end
end

Version data entries

52 entries across 52 versions & 2 rubygems

Version Path
rhodes-7.6.0 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb
rhodes-7.5.1 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb
rhodes-7.4.1 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb
rhodes-7.1.17 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb
rhodes-6.2.0 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb
rhodes-6.0.11 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb
rhodes-5.5.18 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb
rhodes-5.5.17 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb
rhodes-5.5.15 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb
rhodes-5.5.0.22 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb
rhodes-5.5.2 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb
rhodes-5.5.0.7 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb
rhodes-5.5.0.3 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb
rhodes-5.5.0 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb
tauplatform-1.0.3 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb
tauplatform-1.0.2 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb
tauplatform-1.0.1 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb
rhodes-3.5.1.12 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb
rhodes-3.3.5 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb
rhodes-3.4.2 spec/framework_spec/app/spec/core/complex/rationalize_spec.rb