aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/symbol/equal_value_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/symbol/equal_value_spec.rb')
-rw-r--r--spec/ruby/core/symbol/equal_value_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/ruby/core/symbol/equal_value_spec.rb b/spec/ruby/core/symbol/equal_value_spec.rb
new file mode 100644
index 0000000000..7c305fab39
--- /dev/null
+++ b/spec/ruby/core/symbol/equal_value_spec.rb
@@ -0,0 +1,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