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

describe "NilClass#to_i" do
  it "returns 0" do
    nil.to_i.should == 0
  end

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