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