summaryrefslogtreecommitdiff
path: root/spec/ruby/core/nil/to_f_spec.rb
blob: a5f24ba3bf0b2a50a7444e163c63078cbffce591 (plain)
1
2
3
4
5
6
7
8
9
10
11
require_relative '../../spec_helper'

describe "NilClass#to_f" do
  it "returns 0.0" do
    nil.to_f.should == 0.0
  end

  it "does not cause NilClass to be coerced to Float" do
    (0.0 == nil).should == false
  end
end