Sha256: edaabc85a7702c0a2ac936f565f14f42b75b3adcd731243a962804ee026e7002
Contents?: true
Size: 347 Bytes
Versions: 52
Compression:
Stored size: 347 Bytes
Contents
require File.expand_path('../../../spec_helper', __FILE__) require 'rational' describe :rational_to_f, :shared => true do it "returns self converted to a Float" do Rational(3, 4).to_f.should eql(0.75) Rational(3, -4).to_f.should eql(-0.75) Rational(-1, 4).to_f.should eql(-0.25) Rational(-1, -4).to_f.should eql(0.25) end end
Version data entries
52 entries across 52 versions & 2 rubygems