Sha256: 6e090df85804e701e41093b4339d49c4522a2edbc9ab1fa555113e87688777ba
Contents?: true
Size: 400 Bytes
Versions: 52
Compression:
Stored size: 400 Bytes
Contents
require File.expand_path('../../../spec_helper', __FILE__) require 'rational' describe :rational_to_i, :shared => true do it "converts self to an Integer by truncation" do Rational(7, 4).to_i.should eql(1) Rational(11, 4).to_i.should eql(2) end ruby_bug "#", "1.8.6" do it "converts self to an Integer by truncation" do Rational(-7, 4).to_i.should eql(-1) end end end
Version data entries
52 entries across 52 versions & 2 rubygems