aboutsummaryrefslogtreecommitdiffstats
path: root/spec/rubyspec/core/symbol/equal_value_spec.rb
blob: 7c305fab3973db20a59c844bc94cfd3e043539fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require File.expand_path('../../../spec_helper', __FILE__)

describe "Symbol#==" do
  it "only returns true when the other is exactly the same symbol" do
    (:ruby == :ruby).should == true
    (:ruby == :"ruby").should == true
    (:ruby == :'ruby').should == true
    (:@ruby == :@ruby).should == true

    (:ruby == :@ruby).should == false
    (:foo == :bar).should == false
    (:ruby == 'ruby').should == false
  end
end