summaryrefslogtreecommitdiff
path: root/spec/rubyspec/core/false/xor_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubyspec/core/false/xor_spec.rb')
-rw-r--r--spec/rubyspec/core/false/xor_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/rubyspec/core/false/xor_spec.rb b/spec/rubyspec/core/false/xor_spec.rb
new file mode 100644
index 0000000000..3e5c452f9b
--- /dev/null
+++ b/spec/rubyspec/core/false/xor_spec.rb
@@ -0,0 +1,11 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "FalseClass#^" do
+ it "returns false if other is nil or false, otherwise true" do
+ (false ^ false).should == false
+ (false ^ true).should == true
+ (false ^ nil).should == false
+ (false ^ "").should == true
+ (false ^ mock('x')).should == true
+ end
+end