aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/nil/and_spec.rb
blob: 96e04726615af6aec926a729e01a65009dc134a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
require File.expand_path('../../../spec_helper', __FILE__)

describe "NilClass#&" do
  it "returns false" do
    (nil & nil).should == false
    (nil & true).should == false
    (nil & false).should == false
    (nil & "").should == false
    (nil & mock('x')).should == false
  end
end